g close-on-outside-click close-on-escape id="myDialog">
  <button slot="invoker">open</button>
  <div slot="content">
    <h1>Im used as a web component!</h1>
    <p>dialog content</p>
    <button id="closebtn">close</button>
  </div>
</generic-dialog>
</script></code></pre>
          <pre><code class="language-javascript">
  closebtn.addEventListener('click', () => {
    myDialog.close();
  });
    </code></pre>
        </details>
        <hr />
        <generic-dialog close-on-outside-click close-on-escap