test-non-javascript-mime-worker.html (967B)
1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="utf-8"> 5 <title>Web Console test for script with non-JavaScript MIME type</title> 6 <!-- Any copyright is dedicated to the Public Domain. 7 http://creativecommons.org/publicdomain/zero/1.0/ --> 8 <script> 9 "use strict"; 10 11 // Test new Worker 12 new Worker("https://example.com/browser/devtools/client/webconsole/test/browser/test-non-javascript-mime.js"); 13 14 // Test importScripts 15 const source = `importScripts("https://example.com/browser/devtools/client/webconsole/" + 16 "test/browser/" + 17 "test-non-javascript-mime.js");`; 18 const url = URL.createObjectURL(new Blob([source], {type: "application/javascript"})); 19 new Worker(url); 20 </script> 21 </head> 22 <body> 23 <p>Web Console test for Worker and importScripts() inside Worker with non-JavaScript MIME type.</p> 24 </body> 25 </html>