OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <html> |
| 3 <head> |
| 4 <title>Test for first-letter that is added by DOM scripting</title> |
| 5 <style type="text/css"> |
| 6 p:first-letter {text-decoration: underline; color: #CB000F;} |
| 7 </style> |
| 8 <script type="text/javascript"> |
| 9 if (window.testRunner) |
| 10 testRunner.waitUntilDone(); |
| 11 |
| 12 window.onload = function() { |
| 13 document.body.offsetTop; |
| 14 addTextNode(); |
| 15 }; |
| 16 |
| 17 function addTextNode() { |
| 18 var textNode = document.createTextNode('I am adding a new text. '); |
| 19 var para = document.getElementById('test'); |
| 20 para.insertBefore(textNode, para.firstChild); |
| 21 if (window.testRunner) |
| 22 testRunner.notifyDone(); |
| 23 } |
| 24 </script> |
| 25 </head> |
| 26 <body> |
| 27 <p id="test"> |
| 28 This is a test paragraph. You can insert extra text at its start; |
| 29 the :first-letter styles should be updated to accomodate this new text. |
| 30 </p> |
| 31 </body> |
| 32 </html> |
OLD | NEW |