tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

showmodal-shadow-sibling-frame-crash.html (926B)


      1 <!DOCTYPE html>
      2 <html class=test-wait>
      3 <link rel=author href="mailto:jarhar@chromium.org">
      4 <link rel=author href="mailto:noel@chromium.org">
      5 <link rel=help href="https://bugs.chromium.org/p/chromium/issues/detail?id=804047">
      6 
      7 <template>
      8  <custom-dialog></custom-dialog>
      9 </template>
     10 <div id=shadow></div>
     11 <iframe id=sibling></iframe>
     12 
     13 <script>
     14 customElements.define('custom-dialog',class extends HTMLElement {
     15  constructor() {
     16    super();
     17    this.attachShadow({mode: 'open'}).innerHTML = '<dialog></dialog>';
     18  }
     19  show() {
     20    this.shadowRoot.querySelector('dialog').showModal();
     21  }
     22 });
     23 
     24 onload = () => {
     25  const template = document.querySelector('template');
     26  const content = document.importNode(template.content, true);
     27  const dialog = content.querySelector('custom-dialog');
     28  document.querySelector('div').appendChild(dialog);
     29  dialog.show();
     30  document.documentElement.classList.remove('test-wait');
     31 };
     32 </script>