Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/dom/workers/test/     Datei vom 27.6.2026 mit Größe 237 B image not shown  

SSL test_importScripts_2.html  Sprache: HTML


 products/Sources/formale Sprachen/C/Firefox/dom/workers/test/test_importScripts_2.html


<head>
  <title>Test for Worker importScripts</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<script id="worker" type="javascript/worker">
onmessage = async function(msg) {
  try {
    self.importScripts("N:", "");
  } catch (ex) {
    postMessage("done");
  }
};

</script>
<script>
SimpleTest.waitForExplicitFinish();
document.addEventListener("DOMContentLoaded", async () => {
    const blob = new Blob([document.querySelector('#worker').textContent],
                          {type: "text/javascript"});
    const worker = new Worker(window.URL.createObjectURL(blob));
    worker.postMessage([], []);
    worker.onmessage = function(e) {
      if (e.data == "done") {
        ok(true);
        SimpleTest.finish();
      }
    };
});
</script>
</pre>
</body>
</html>

Messung
CHZG
8410010094

¤ Dauer der Verarbeitung: 0.25 Sekunden  ¤

*© Formatika GbR, Deutschland