Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions setImmediate.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
function canUsePostMessage() {
// The test against `importScripts` prevents this implementation from being installed inside a web worker,
// where `global.postMessage` means something completely different and can't be used for this purpose.
if (global.postMessage && !global.importScripts) {
if (global.postMessage && !global.importScripts && !(global.port && global.port.emit)) {
var postMessageIsAsynchronous = true;
var oldOnMessage = global.onmessage;
global.onmessage = function() {
Expand Down Expand Up @@ -183,4 +183,4 @@

attachTo.setImmediate = setImmediate;
attachTo.clearImmediate = clearImmediate;
}(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));
}(typeof self === "undefined" || !Object.isExtensible(self) ? typeof global === "undefined" || !Object.isExtensible(global) ? this : global : self));