Open Bug 723020 Opened 8 years ago Updated Last year
Implement a column argument to window
As specced in <https://www.w3.org/Bugs/Public/show_bug.cgi?id=13319>.
Want to do it?
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.
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. :-)
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'
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
You need to log in before you can comment on or make changes to this bug.