title: Setting HTML Button`onclick` in template literal
body: <p>I have an html template that i'm using template literals for. The function looks like the below</p>
  
  <pre><code>// postCreator.js
  export const blogPostMaker = ({ title, content, address, id }, deletePost) =&gt; {
    const innerHtml = `
    &lt;blog-post&gt;
      &lt;h1 class='title'&gt;${title}&lt;/h1&gt;
      &lt;p class='content'&gt;${content}&lt;/p&gt;
      &lt;p class='address'&gt;${address}&lt;/p&gt;
      &lt;button onclick='${() =&gt; deletePost(id)}'&gt;Delete&lt;/button&gt;
    &lt;/blog-post&gt;
    `
    return innerHtml
  }
  
  
  //Blog.js
    postHelper.getSeriesOfPosts(10)
    .then(resp =&gt; {
      resp.forEach(post =&gt; (blogDiv.innerHTML += blogPostMaker(post, postHelper.deletePost)))
    })
  </code></pre>
  
  <p>What I can't figure out is how to get the onclick to work. I've tried passing in an anon function in <code>Blog.js</code> to the <code>postCreator</code> as well with no luck.</p>
  
  <p>Any ideas?</p>