Unrelated to typing, but while you added the note about IE11:
Why are we first trying attachEvent (IE-specific) before trying addEventListener, which should be more in use?