gecko-dev/dom/workers/test/bug1132395_sharedWorker.js
Victor Porof 0a8ff0ad85 Bug 1561435 - Format dom/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35951

--HG--
extra : source : 62f3501af4bc1c0bd1ee1977a28aee04706a6663
2019-07-05 10:44:55 +02:00

12 lines
370 B
JavaScript

dump("SW created\n");
onconnect = function(evt) {
dump("SW onconnect\n");
evt.ports[0].onmessage = function(e) {
dump("SW onmessage\n");
var blob = new Blob(["123"], { type: "text/plain" });
dump("SW blob created\n");
var url = URL.createObjectURL(blob);
dump("SW url created: " + url + "\n");
evt.ports[0].postMessage("alive \\o/");
};
};