Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

switch window.onerror with addeventlistener? #47

Open
dxe4 opened this issue Mar 1, 2016 · 0 comments
Open

switch window.onerror with addeventlistener? #47

dxe4 opened this issue Mar 1, 2016 · 0 comments

Comments

@dxe4
Copy link

dxe4 commented Mar 1, 2016

allows other libraries to use .onerror as well.
i think this is what jquery does:

    if ( window.addEventListener ) {
        window.addEventListener(eventname, func, false);
    } else {
        window.attachEvent(eventname, func);  // IE <=8 (not sure if event name is the same)
    }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants