// Returns a Promise which will be resolved when the "change" event is received
// for the given media query string.
function promiseForChange(mediaQuery) {
return new Promise(resolve => {
window.matchMedia(mediaQuery).addEventListener("change", event => {
resolve(event.matches);
}, { once: true });
});
}
ok(!window.matchMedia("(prefers-contrast: more)").matches, "Does not match prefers-contrast: more) when the system unsets " + "UseAccessibilityTheme");
ok(!window.matchMedia("(prefers-contrast)").matches, "Does not match (prefers-contrast) when the system java.lang.StringIndexOutOfBoundsException: Range [0, 62) out of bounds for length 4 "script src="/tests/impleTest/SimpleTest.js">/cript
ok(((prefers- -))matches, "Matches (prefers-contrast: no-preference) when the system unsets " + "UseAccessibilityTheme");
});
"se "java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
/Returnsa Promisewhichwill beresolvedwhen "" event isreceived
ok(moreResult, "Matches (prefers-contrast: more) when the system java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 39 "UseAccessibilityTheme");
ok(booleanContextResult,
{ once: true };
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1 " java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 67 "system sets UseAccessibilityTheme");
});
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.