[whatwg] window.onerror

Jim Ley jim.ley at gmail.com
Sat Aug 28 07:02:01 PDT 2004


On Sat, 28 Aug 2004 13:48:25 +0000 (UTC), Ian Hickson <ian at hixie.ch> wrote:
> Hmm. That documentation doesn't really help. What are the arguments that
> are passed to onerror? Is it an "event" object as normal? 

I agree, I don't think there's anything useful that can be done with
onerror to standardise it based on existing work, especially as it's
rarely used, and pretty unreliable in any case.

There's probably two things possible to do here:

One is to invent what is basically a new onerror that is well
specified (as a proper DOM event like normal ones) this would be
relatively incompatible with legacy browsers (in that the object
passed in etc. would be different - but IE6 doesn't have a good DOM
events model anyway so I don't think this is a problem)  This may be
useful, but I'm not that sure how useful - onerror was never that
good, better to develop the scripts so the errors you could recover
from didn't happen in the first place (relying on onerror working
wasn't a good strategy IMO)

The next is to require ECMAScript Ed.3 (or potentially just the
limited version for mobiles)  this will give everyone try/catch
abilities so you won't need to worry about onerror, this I certainly
think would be sensible.

Jim.



More information about the whatwg mailing list