logOverlayNode, dialogNode) => {

      dialogOverlayNode.innerHTML = 'only closes on escape';
      const button = document.createElement('button');
      button.innerHTML = 'close';

      button.addEventListener('click', () => {
        dialog.close();
      })

      dialogOverlayNode.appendChild(button);
    }
  });
});
          </code></pre>
        </details>
        <hr />
        <button id="closeOnEscape">open</button><br />
      </div>

      <div class="demo">
        <h3>Only closes on button