facebook / fbjs

A collection of utility libraries used by other Meta JS projects.
MIT License
1.95k stars 313 forks source link

setImmediate is broken in IE10 / IE11. #252

Open wmill opened 7 years ago

wmill commented 7 years ago

Calls to setImmediate won't working in IE10 or IE11.

Known bug since 2014, https://github.com/YuzuJS/setImmediate/issues/35

Basically those versions of IE don't allow you to make a naked call to setImmediate, it must be called as window.setImmediate. However the setImmediate package doesn't install if there's a global setImmediate.

https://github.com/YuzuJS/setImmediate/blob/master/setImmediate.js#L4-L6

Workaround is found here, https://github.com/reflux/refluxjs/issues/374

Briefly just set var setImmediate = window.setImmediate.bind(window); if there's a global.setImmediate.

I know it's really a bug in a separate package, but it's been open since 2014. I'm hoping you have higher standards and will implement the workaround :)