Open
Bug 723020
Opened 13 years ago
Updated 2 years ago
Implement a column argument to window.onerror
Categories
(Core :: DOM: Core & HTML, enhancement, P5)
Core
DOM: Core & HTML
Tracking
()
NEW
People
(Reporter: Ms2ger, Unassigned)
References
Details
As specced in <https://www.w3.org/Bugs/Public/show_bug.cgi?id=13319>.
Comment 1•13 years ago
|
||
Want to do it?
Comment 2•13 years ago
|
||
I'm not used to looking at bugs thrown up at W3 and I was wondering if someone could help me out here locating the actual updated spec with these new changes.
Also, where is this sort of stuff currently handled? This bug is definitely interesting but I wanted to read a little into it.
Comment 3•12 years ago
|
||
Hmm. I'm a bit worried about engines not agreeing too easily on the exact column number. I'd bet the column numbers we expose now on error objects are based on the *expression* that generated the error, not the statement. Which actually seems a little better to me, because it makes columns in minified stuff more useful. But it's almost certainly harder for engines to be consistent about. Anyway, a substantial pitfall to be concerned about, here, and worthy of plenty of automated testcases if/when this happens.
Also it appears to me that the spec language in the commit referenced in the spec bug doesn't say what the column number should be -- statement, expression, whatever -- but I should probably complain about that in the spec bug database, or something. :-)
Comment 4•11 years ago
|
||
I've done some testing in a few current browsers, and it looks like column numbers are (unsurprisingly) a total mess:
// e.g. 1
"foo"; throw new Error("moo");
123456789'123456789"123456789#123456
Chrome: 20 index of 'new'
Safari: 36 index of ';'
IE : 14 index of 'throw'
// e.g 2
alert(window.foo.bar);
123456789'123456789"123456789#123456
Chrome: 23 index of '.'
Safari: 23 index of '.'
IE : 7 index of 'alert'
// e.g. 3
alert(foo.bar);
123456789'123456789"123456789#123456
Chrome: 13 index of 'foo'
Safari: 16 index of '.'
IE : 7 index of 'alert'
// e.g. 4
alert(window.atob());
123456789'123456789"123456789#123456
Chrome: 20 index of 'atob'
Safari: 24 index of '()'
IE : 7 index of 'alert'
// e.g. 5
(1 + 1, atob());
123456789'123456789"123456789#123456
Chrome: 15 index of 'atob'
Safari: 19 index of '()'
IE : 15 index of 'atob'
Comment 5•6 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•