gecko-dev/layout/base/tests/bug1109968-1-ref.html

18 строки
518 B
HTML

<html class="reftest-wait">
<body onload="start()">
<div onfocus="done()" contenteditable>foo<div contenteditable="false"><a href="#">bar</a></div>baz</div>
<script>
var div = document.querySelector("div");
function start() {
div.focus();
}
function done() {
var sel = getSelection();
// Set the caret right before "baz"
sel.collapse(div.lastChild, 0);
document.documentElement.removeAttribute("class");
}
</script>
</body>
</html>