addLoadEvent(function() { var target = document.getElementById("target"); var thief = document.getElementById("thief"); var sel = window.getSelection();
// select the contents of the editable area
sel.removeAllRanges();
sel.selectAllChildren(target);
target.focus();
// press some key
sendString("X");
is(target.textContent, "X", "Text input should work (sanity check)");
// select the contents of the editable area again
sel.removeAllRanges();
sel.selectAllChildren(target);
thief.focus();
// press some key with the thief having focus
sendString("Y");
is(target.textContent, "X", "Text entry should not work with another element focused");
SimpleTest.finish();
});
</script>
</pre>
</body>
</html>
Messung V0.5
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.