whitespace-reattach.html (630B)
1 <!DOCTYPE html> 2 <link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1308400"> 3 <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> 4 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 5 <div id="target" style="display: grid; grid-template: 100px / 100px 100px; background: red; width: 100px;"> 6 text 7 </div> 8 <script> 9 document.body.offsetTop; 10 const el = document.createElement('div'); 11 el.style.background = 'green'; 12 const target = document.getElementById('target'); 13 const content = target.childNodes[0].splitText(1); 14 target.replaceChild(el, content); 15 </script>