| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <div id="warning"> | |
| 3 This test requires window.internals. If you use content_shell, | |
| 4 "--expose-internals-for-testing" command flag enables it. | |
| 5 </div> | |
| 6 <div id="div" contenteditable>You has the right.</div> | |
| 7 <script> | |
| 8 // This tests the appearance of the grammar markers rendered by Blink. | |
| 9 | |
| 10 const div = document.getElementById('div'); | |
| 11 const text = div.firstChild; | |
| 12 | |
| 13 // Mark 'has' with grammar marker. | |
| 14 const range = document.createRange(); | |
| 15 range.setStart(text, 4); | |
| 16 range.setEnd(text, 7); | |
| 17 if (window.internals) { | |
| 18 document.getElementById('warning').style.display = 'none'; | |
| 19 internals.setMarker(document, range, 'grammar'); | |
| 20 } | |
| 21 </script> | |
| OLD | NEW |