| <!doctype html> |
| <title>CSS Test: ::first-line updates after inserting text node at start of paragraph</title> |
| <link rel="author" title="Tim Nguyen" href="https://github.com/nt1m"> |
| <link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#first-line-pseudo"> |
| <link rel="match" href="first-line-insert-text-node-dynamic-ref.html"> |
| <style> |
| p { width: 100px; } |
| p::first-line { text-decoration: underline; color: #CB000F; } |
| </style> |
| <p id="test">This is a test paragraph. You can insert extra text at its start; the ::first-line styles should be updated to accommodate this new text.</p> |
| <script> |
| document.body.offsetTop; |
| var para = document.getElementById('test'); |
| para.insertBefore(document.createTextNode('I am adding a new text. '), para.firstChild); |
| </script> |