fat / bean

an events api for javascript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add(window, 'message') not working on IE8?

djanowski opened this issue · comments

I'm investigating this.

Is it a known issue?

bean.add(window, 'message') doesn't work, but window.onmessage does.

Hi @djanowski, this hasn't been reported before but I think I know where the problem might be. In your local version, try adding 'message' to the list of event types in this list. You'll notice that 'message' is only counted as 'native' for W3C_MODEL browsers in list below, it probably should be in the upper list since IE8 supports it (but not 6 or 7 I believe).
Let us know if that works for you and I'll move it up. A test for this would be great, to prevent regressions, but I suspect the cost of implementing a test would be pretty large compared to the benefit! If you're up to the challenge though...

@rvagg: Confirmed – that does fix the issue. Want me to send a PR?

Hold on – I still had to 'fix' the event myself on IE8 by doing:

bean.add(window, 'message', function(e) {
  var e = event;
  ...
}

starting to sound like it needs a test or two

Will do ;-)