Plato on Github
Report Home
dojo/testsDOH/_base/loader/hostenv_webworkers/worker6.js
Maintainability
69.30
Lines of code
39
Difficulty
12.60
Estimated Errors
0.19
Function weight
By Complexity
By SLOC
// summary: // Test the use of dojo/on without access to dom in a webworker. var dojoConfig = { baseUrl: "../../../../../", async: true, packages: [{ name: "dojo", location: "dojo" }] }; importScripts("../../../../dojo.js", "console.js"); try{ require(["dojo/on"], function(on){ on(self, "message", function(message){ if(message.data.type === "gotMessage"){ self.postMessage({ type: "testResult", test: "dojo/on in a worker is working", value: true }); }else{ self.postMessage({ type: "testResult", test: "dojo/on in a worker is working", value: false }); } }); self.postMessage({ type: "requestMessage" }); }); }catch(e){ self.postMessage({ type: "testResult", test: "dojo/on in a worker is working", value: false }); }