tor-browser

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

class-names-across-iframes.html (860B)


      1 <!DOCTYPE html>
      2 <link rel="match" href="class-names-across-iframes-ref.html" />
      3 <html>
      4 <title>Verifies matching of class names across iframes with/without quirks</title>
      5 <body>
      6 <template><p class="Testing">text that should be green</p></template>
      7 
      8 <script>
      9  /*
     10    This test is a regression test for a bug in chrome. See
     11    https://crbug.com/1474382. It triggers quirks mode in the iframe
     12    and then exits quirks mode.
     13    */
     14  const iframe = document.createElement('iframe');
     15  document.body.append(iframe);
     16 
     17  const doc = iframe.contentWindow.document;
     18 
     19  const data = document.querySelector('template').innerHTML;
     20  const body = doc.createElement('body');
     21  body.innerHTML = data;
     22 
     23  doc.open();
     24  doc.write(`<!DOCTYPE html><html><head><style>p.Testing{color:green;}</style></head><body>${data}</body></html>`);
     25  doc.close();
     26 </script>
     27 </body>
     28 </html>