function waitForPaint() {
return new Promise(r => {
window.requestAnimationFrame(function () {
window.requestAnimationFrame(function () {
r();
});
});
});
}
waitForPaint().then(function () {
// Verify that this layout change doesn't cause the visual blue background
// of the text selection to disappear.
text.style["margin-top"] = "100px";
waitForPaint().then(function () {
document.documentElement.className = '';
});
});
}
SimpleTest.waitForFocus(run);
</script>
<body>
<div>
<div>
<span id="text">This is a loonnnnnnnnnnnnnnnnnnnnnnnnnnnng paragraph</span>
</div>
</div>
</body>
</html>
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.