I'm not sure if this is a bug, but I think so.
Expected behavior: node-webkit copies setImmediate over from Node.js global to window.
Actual behavior: It doesn't:
> setImmediate
ReferenceError: setImmediate is not defined
> global.setImmediate
function () {
var t = NativeModule.require('timers');
return t.setImmediate.apply(this, arguments);
}
What makes this particularly irritating is that the setImmediate shim provided by NobleJS is fooled by "global.setImmediate" and doesn't trigger.
https://github.com/NobleJS/setImmediateSo ultimately you end up with no setImmediate at all, even if your app includes the shim.