position-try-rule-caching-001.html (877B)
1 <!DOCTYPE html> 2 3 <title>Tests that given two sheets containing the same @position-try, modifying one sheet doesn't affect the other sheet</title> 4 5 <link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#fallback-rule"> 6 <link rel="author" title="Kiet Ho" href="mailto:kiet.ho@apple.com"> 7 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 11 <script> 12 test(() => { 13 const style1 = new CSSStyleSheet(); 14 const style2 = new CSSStyleSheet(); 15 16 const cssText = "@position-try --try { position-area: center }"; 17 style1.replaceSync(cssText); 18 style2.replaceSync(cssText); 19 20 style1.cssRules[0].style.positionArea = "bottom right"; 21 22 assert_equals(style2.cssRules[0].style.positionArea, "center"); 23 }, "Modifying one sheet containing @position-try rule doesn't affect another sheet"); 24 </script>