component/event — pull request #6 by necolas (2013-02-14 04:36:33+00:00)
Title: Normalize event handler in IE

`attachEvent` invokes the event handler in context of window object. To
ensure additional consistency with `addEventListener`, make sure that
`attachEvent` always invokes the event handler in the context of the
element to which the listener is bound.

The `window.event` object is passed as the first argument to the handler
function to ensure that it has the proper event object. `attachEvent`
only makes the event object accessible via the global `window.event`
property; it doesn't pass the event to the handler function.

As far as I understand, a consequence of this change is the creation of
a memory leak (due to the circular reference) in IE 6/7. I believe IE 8
meant to have fixed this issue.