Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

fromEvent is broken in IE8 when used with querySelectorAll #725

Closed
apiv opened this issue May 20, 2015 · 1 comment
Closed

fromEvent is broken in IE8 when used with querySelectorAll #725

apiv opened this issue May 20, 2015 · 1 comment

Comments

@apiv
Copy link

apiv commented May 20, 2015

I've been using RxJS with great success so far in a project that needs to support IE8. I've recently found an issue with Rx.Observable.fromEvent in IE8. This issue prevents using fromEvent with querySelectorAll. I've also found a fix for that problem, which I've included in this pull request.

To explain what's wrong with IE8:

  • document.querySelectorAll returns a StaticNodeList instead of NodeList
  • Object.prototype.toString.call() works differently in IE8:
// In IE8
// Assume `obj` is an instanceof NodeList
console.log(Object.prototype.toString.call(obj)) // => '[object Object]'
console.log(Object.prototype.toString.call(obj.constructor) // => '[object NodeList]'
console.log(Object.prototype.toString.call(MyClass)) // => '[object NodeList]'

// In an actual web browser
// Assume `obj` is an instanceof NodeList
console.log(Object.prototype.toString.call(obj)) // => '[object NodeList]'
console.log(Object.prototype.toString.call(obj.constructor)) // => '[object Function]'
console.log(Object.prototype.toString.call(MyClass)) // => '[object Function]'
@mattpodwysocki
Copy link
Member

@ajp427 closing as I have merged the PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants