These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:07 pm Advanced search

window.onerror specification update

Do you think the HTML spec should do something differently? You can discuss spec feedback here, but you should send it to the WHATWG mailing list or file a bug in the W3C bugzilla for it to be considered.

window.onerror specification update

Postby JavaScriptDude » Mon Aug 15, 2011 3:40 am

Good day,

I have been reviewing the status of WebKit and their implementation of window.onerror. They implemented it recently after several years in the queue. The unfortunate thing about their implementation is that it does not give access to any way of getting the full error stack. Both IE and Mozilla have had capabilities to get the call stack (albeit not standard or similar).

The issue with WebKit is that they are following the WhatWG specification exactly for 7.1.3.5 Runtime script errors. This specification does not give any reference to access the error object or stack information.

Having the full error stack is immensely helpful when debugging large and complex javascript applications and having this in FireFox with the level of detail they have (JS Source URL, Function and Line Number), is the cats meow. IE is just barely usable offering the ability to use arguments.callee.caller call stack crawling. I have built extremely complex JS Application for many years based around the master error handler capabilities of window.onerror.

My question is, what is the possibility of having the specification for 7.1.3.5 Runtime script errors updated to include a fourth parameter for the error object which was thrown.

Having the error object at the error handler is first common sense from a cross language perspective and it gives access to the object that "should" contain access to the stack and finally gives access to the error class, error message, throw stack access (errPrevious = error.getCause();).

I would be glad to make a detailed business case for this change but I have no idea on what the next steps would be to get this done.

Thanks for your time,
- Timothy (Jsd) Quinn
JavaScriptDude
<h6>
 
Posts: 1
Joined: Mon Aug 15, 2011 3:23 am

Re: window.onerror specification update

Postby zcorpan » Tue Aug 16, 2011 1:13 pm

Hi

I recommend you state your use case (which I guess is easier debugging? why isn't Dragonfly/Firebug/etc good enough for debugging purposes?), and document what Mozilla implements, on whatwg@whatwg.org or in W3C bugzilla.
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden


Return to Feedback on the Specs

Who is online

Users browsing this forum: No registered users and 0 guests