tor-browser

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

keyframes-004.html (880B)


      1 <!doctype html>
      2 <title>CSS Test: @keyframes applies to ::slotted.</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <link rel="help" href="https://drafts.csswg.org/css-scoping/#shadow-names">
      6 <div id="host"><div id="in-document"></div></div>
      7 <script>
      8  test(function() {
      9    host.attachShadow({ mode: "open" }).innerHTML = `
     10      <style>
     11        @keyframes myanim {
     12          from { background: red; }
     13          to { background: green; }
     14        }
     15        ::slotted(#in-document) {
     16          width: 100px;
     17          height: 100px;
     18          background: blue;
     19          animation: myanim 10s infinite;
     20        }
     21      </style>
     22      <slot></slot>
     23    `;
     24 
     25    assert_equals(document.getElementById('in-document').getAnimations().length, 1);
     26  }, "@keyframes in shadow tree applies to the slotted element");
     27 </script>