Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / Source / web / tests / data / text_selection.html
blobf605e9a54f00746b6f32b1b22719f1803b902472
1 <!DOCTYPE html>
2 <html>
3 <body>
5 <span id="header">[
6 <span id="header_1">Header 1.</span>
7 <span id="header_2">Header 2.</span>
8 ]</span>
10 <span id="editable" contenteditable="true">[
11 <span id="editable_1">Editable 1.</span>
12 <span id="editable_2">Editable 2.</span>
13 ]</span>
15 <span id="footer">[
16 <span id="footer_1">Footer 1.</span>
17 <span id="footer_2">Footer 2.</span>
18 ]</span>
20 <script>
21 function selectElement(id) {
22 var element = document.getElementById(id);
23 var range = document.createRange();
24 range.selectNode(document.getElementById(id));
25 window.getSelection().removeAllRanges();
26 window.getSelection().addRange(range);
28 </script>
29 </body>
30 </html>