grid-template-node-not-connected.html (776B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <link rel="help" href="https://bugs.webkit.org/show_bug.cgi?id=261421"> 5 <link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com"> 6 <meta name="assert" content="test should not crash and grid-template for child should be the empty string after disconnecting the element"> 7 <script src="/resources/testharness.js"></script> 8 <script src="/resources/testharnessreport.js"></script> 9 </head> 10 <style> 11 #child { 12 grid-template: 10px / 10px; 13 } 14 </style> 15 <div> 16 <div id="child"></div> 17 </div> 18 <script> 19 test(() => { 20 let styleDeclaration = window.getComputedStyle(document.getElementById("child")); 21 document.querySelector("body > div:nth-child(1)").textContent = ""; 22 assert_equals(styleDeclaration.gridTemplate, ""); 23 }); 24 </script> 25 </html>