blob: 8f24f909694c0d6f4c7bd67660cb714f4a336219 [file] [log] [blame]
<body>
<div>This tests to make sure that document.getSelection() is supported and returns a Selection object for the document.</div>
<div id="div">xxx</div>
<div id="console"></div>
<script>
if (window.testRunner)
window.testRunner.dumpAsText();
div = document.getElementById("div");
text = div.firstChild;
s = document.getSelection();
s.setBaseAndExtent(text, 1, text, 2);
document.getElementById("console").innerText = "Selection: (" + s.baseNode + ", " + s.baseOffset + ") to (" + s.extentNode + ", " + s.extentOffset + ")";
</script>
</body>