Skip to content

Commit

Permalink
So it turns out msSetImmediate must be bound to window.
Browse files Browse the repository at this point in the history
This seems bizarre.
  • Loading branch information
domenic committed May 16, 2012
1 parent bbc3c4c commit 587c4fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion q.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ if (typeof process !== "undefined") {
nextTick = process.nextTick;
} else if (typeof msSetImmediate === "function") {
// IE 10 only, at the moment
nextTick = msSetImmediate;
// And yes, ``bind``ing to ``window`` is necessary O_o.
nextTick = msSetImmediate.bind(window);
} else if (typeof setImmediate === "function") {
// https://github.com/NobleJS/setImmediate
nextTick = setImmediate;
Expand Down

0 comments on commit 587c4fa

Please sign in to comment.