Closed hjdivad closed 10 years ago
IE8 support is not broken. Window.prototype.attachEvent.apply
isn't a javascript Function for Internet Explorer 8 and raises an exception when calling toString
on it ("Object doesn't support this property or method"
), which can lead to that confusion.
But Window.prototype.attachEvent.apply(this, args)
is valid call. The test Multiple message listeners can be added to a window
covers that part.
hooray ie8 ^_^
IE8 support is broken in
0.1.4
, which is preventing #19 from passing. The issue is that we rely onattachEvent.apply
when shadowing it. Recall that we shadowattachEvent
to save people who don't already check message sources on their event listeners, which is perhaps already doing too much to save people from themselves.Probably the best way out is to have the original
attachEvent
saved onwindow
rather than in a closure. We should certainly not do this foraddEventListener
.