slot-element-default-display.html (778B)
1 <!DOCTYPE html> 2 <title>CSS Test (Display): <slot> elements default display should be contents</title> 3 <link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#flow-content-3"> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 7 <body> 8 9 <script> 10 test(() => { 11 let host = document.body.appendChild(document.createElement("div")); 12 let slot = host.attachShadow({ mode: "open" }).appendChild(document.createElement("slot")); 13 let cs = getComputedStyle(slot); 14 assert_equals(cs.getPropertyValue("display"), "contents", "slot default display is not contents"); 15 document.body.removeChild(host); 16 }, `slot element with default display should be contents`); 17 18 </script>