<!DOCTYPEhtml>
<html> <!-- Repeated reload an iframe. When iframe's script is loaded from the bytecode cache, dynamic module import should still resolve modules based on the script's URL.
-->
<head>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<script>
const iframeId = "test_iframe";
var checkResult = null;
async function startTest() {
SimpleTest.waitForExplicitFinish();
// Setting dom.expose_test_interfaces pref causes the
// nsScriptLoadRequest to fire event on script tags, with information
// about its internal state. The ScriptLoader source send events to
// trace these and resolve a promise with the path taken by the
// script loader.
//
// Setting dom.script_loader.bytecode_cache.strategy to -1 causes the
// nsScriptLoadRequest to force all the conditions necessary to make a
// script be saved as bytecode in the alternate data storage provided
// by the channel (necko cache).
await SpecialPowers.pushPrefEnv({
set: [
['dom.script_loader.bytecode_cache.enabled', true],
['dom.expose_test_interfaces', true],
["dom.script_loader.bytecode_cache.strategy", -1]
]});
for (let i = 0; i < 3; i++) {
let iframe = document.getElementById(iframeId);
if (iframe) {
document.body.removeChild(iframe);
}
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.