<script> | |
if (window.testRunner) | |
testRunner.dumpEditingCallbacks(); | |
</script> | |
<p>Only 'baz' should be selected below.</p> | |
<div id="test" style="width: 50px; margin-left: 50px; border: 1px solid black;">foo bar <a id="selectme" href="foo">baz</a></div> | |
<script> | |
var s = window.getSelection(); | |
var e = document.getElementById("selectme"); | |
s.setBaseAndExtent(e, 0, e, 1); | |
</script> |