Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-grid/parsing/grid-template-node-not-connected.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com">
<meta name="assert" content="test should not crash and grid-template for child should be the empty string after disconnecting the element">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<style>
#child {
grid-template: 10px / 10px;
}
</style>
<div>
<div id="child"></div>
</div>
<script>
test(() => {
let styleDeclaration = window.getComputedStyle(document.getElementById("child"));
document.querySelector("body > div:nth-child(1)").textContent = "";
assert_equals(styleDeclaration.gridTemplate, "");
});
</script>
</html>