UNPKG

dojo

Version:

Dojo core is a powerful, lightweight library that makes common tasks quicker and easier. Animate elements, manipulate the DOM, and query with easy CSS syntax, all without sacrificing performance.

43 lines (38 loc) 808 B
// 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 }); }