HubSpot/youmightnotneedjquery — pull request #62 by dustMason (2014-03-19 18:45:30+00:00)
Title: use `.call` to give similar behavior between addEventListener and attachEvent

Handlers added using `addEventListener` set the value of `this` to the element (`el` in the example) while `attachEvent` sets `this` to `window` which makes it completely useless. Using `.call` here makes `attachEvent` behave like `addEventListener` so that this code behaves as expected.

see http://quirksmode.org/dom/events/