slot-non-html-display-value.html (897B)
1 <!doctype html> 2 <title>CSS Test: non-HTML slot elements don't get display: contents by default.</title> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> 6 <link rel="help" href="https://drafts.csswg.org/css-scoping/#slots-in-shadow-tree"> 7 <link rel="help" href="https://bugzil.la/1468127"> 8 <body> 9 <script> 10 test(function() { 11 const non_html_slot = document.createElementNS("http://www.w3.org/2000/svg", "slot"); 12 document.body.appendChild(non_html_slot); 13 const display = getComputedStyle(non_html_slot).display; 14 // contents would get turned to "none" due to https://drafts.csswg.org/css-display/#unbox-svg 15 assert_true(display != "contents" && display != "none"); 16 }, "Non-HTML slot elements shouldn't be display: contents by default."); 17 </script> 18 </body>