tor-browser

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

variable-generated-content-dynamic-001.html (580B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Test: Dynamic attribute change handling in generated content</title>
      4 <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
      5 <link rel="help" href="https://drafts.csswg.org/css-variables/#using-variables">
      6 <link rel="match" href="variable-generated-content-dynamic-001-ref.html">
      7 <style>
      8 div::before {
      9  --my-attr: attr(data-foo);
     10  content: var(--my-attr);
     11 }
     12 </style>
     13 <div data-foo="FAIL"></div>
     14 <script>
     15 document.body.offsetTop;
     16 document.querySelector('div').setAttribute('data-foo', "PASS");
     17 </script>