Closed lukerattei closed 11 years ago
I did have a workaround pre-3.0 that handled the latter case but I don't know why I removed it to be honest. I'm going to have a think and try to remember why I removed this though it was probably an oversight.
Thanks for your contributions and sorry for taking so long to get back to you.
Apologies, closed by accident. I remember why I removed the existing polyfiller for window.Node
; I mistaking thought I only did it for compatibility with jsdom and forgot about legacy IE support. The other fix looks good too.
Once you've made the previously recommended changes I'll be happy to merge this in.
No problem. Thanks for reviewing this!
This pull request addresses issue #35.
Without this patch, IE 8 raises the error "Object doesn't support this property or method" and fails to parse. One error was caused by
match()
being called on aCSSStyleDeclaration
object instead of aString
. Another error was caused bywindow.Node
being undefined in IE 8 and older. This patch checks formatch()
to be a function before calling it. This patch also defineswindow.Node
if it needs to be defined.