Javascript - Is it possible to prototype window.onerror if the browser is webkit based?

Posted by JK on Stack Overflow See other posts from Stack Overflow or by JK
Published on 2010-05-21T02:37:36Z Indexed on 2010/05/21 2:40 UTC
Read the original article Hit count: 222

Filed under:
|
|

I know that webkit browsers do not support window.onerror. Would it be possible to create a prototype with the same arguments to mimic this if it is not present? eg

if (!window.onerror) {
    // create a prototype to implement the missing function
}

I've only ever used javascript, I've never extended it, so I don't know what is required, and what constraints there are etc.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about prototype