addLoadEvent(function() { var win = open(TEST_URL, "", "width=600,height=600");
SimpleTest.waitForFocus(function() { var doc = win.document; varinput = doc.querySelector("input");
// Focus the input box, and wait for the focus to actually happen input.focus();
win.requestAnimationFrame(function() {
win.requestAnimationFrame(function() {
// Scroll down a bit
win.scrollTo(0, 5000);
setTimeout(function() {
is(Math.round(win.pageYOffset), 5000, "Page should be scrolled correctly");
// Refocus the window
SimpleTest.waitForFocus(function() {
SimpleTest.waitForFocus(function() {
is(Math.round(win.pageYOffset), 5000, "The page's scroll offset should not have been changed");
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 ist noch experimentell.