flushStyle();
let currentRestyleGeneration = utils.restyleGeneration;
// No style changed, so we should not restyle.
getComputedStyle(foo).backgroundColor;
is(utils.restyleGeneration, currentRestyleGeneration, "Shouldn't restyle anything if no style changed");
// foo's parent has changed, must restyle.
container.classList.toggle('black');
getComputedStyle(foo).backgroundColor;
isnot(utils.restyleGeneration, currentRestyleGeneration, "Should have restyled something");
// The change of foo should not affect its parent.
foo.classList.toggle('black');
getComputedStyle(container).backgroundColor;
is(utils.restyleGeneration, currentRestyleGeneration, "Shouldn't restyle anything if no style changed");
// It should restyle for foo's later sibling.
getComputedStyle(bar).backgroundColor;
isnot(utils.restyleGeneration, currentRestyleGeneration, "Should have restyled something");
SimpleTest.finish();
</script>
Messung V0.5
¤ Dauer der Verarbeitung: 0.1 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.