add_task(async function() {
let sheet = new CSSStyleSheet();
await sheet.replace(`* { color: blue }`);
let host = document.querySelector("#host");
host.adoptedStyleSheets = [sheet, sheet];
document.adoptedStyleSheets.push(sheet);
let res = InspectorUtils.getAllStyleSheets(document);
let foundUA = false;
let adoptedCount = 0;
for (let s of InspectorUtils.getAllStyleSheets(document)) {
if (SpecialPowers.unwrap(s) == sheet) {
adoptedCount++;
}
if (s.href === "resource://gre-resources/ua.css") {
foundUA = true;
}
}
ok(foundUA, "UA sheet should be returned with all the other sheets.");
is(adoptedCount, 1, "Adopted stylesheet should show up once");
});
</script>
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.