Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-contain/crashtests/change-text-node-data.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>No crash when changing text node data in size-contained element</title>
<style>
#test {
contain: layout size;
line-height: 1;
}
</style>
<div id="test">
<div style="display: inline-block;"></div>
</div>
<script>
let contentNode = document.createTextNode("");
contentNode.data = "foo";
document.getElementById('test').appendChild(contentNode);
document.body.offsetLeft;
contentNode.data = "bar";
</script>