This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27459 - Clearer spec for "message" in onerror
Summary: Clearer spec for "message" in onerror
Status: RESOLVED WONTFIX
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: https://html.spec.whatwg.org/#runtime...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-28 10:15 UTC by contributor
Modified: 2015-09-07 09:13 UTC (History)
6 users (show)

See Also:


Attachments

Description contributor 2014-11-28 10:15:50 UTC
Specification: https://html.spec.whatwg.org/multipage/webappapis.html
Multipage: https://html.spec.whatwg.org/multipage/#runtime-script-errors
Complete: https://html.spec.whatwg.org/#runtime-script-errors
Referrer: https://html.spec.whatwg.org/multipage/

Comment:
Clearer spec for "message" in onerror

"Let message be a user-agent-defined string describing the error in a helpful
manner." 

I think this should have a more predictable format such that for any exception
thrown by the author at least, the message should be testable with === in test
cases.

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3318

Posted from: 90.230.218.37 by simonp@opera.com
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.62 Safari/537.36 OPR/26.0.1656.20 (Edition beta)
Comment 1 Ian 'Hixie' Hickson 2014-12-01 19:10:40 UTC
Can't authors just get the actual object and use that? That's far better practice.
Comment 2 Ian 'Hixie' Hickson 2014-12-01 19:11:42 UTC
(In general I think we could do as you suggest, though. Can DOM define a spec hook for getting the standardised string out of an Error or DOMException object? Or should I define the pattern here?)
Comment 3 Anne 2015-09-02 08:31:45 UTC
Simon, how would you deal with localizing the error message?
Comment 4 Simon Pieters 2015-09-04 21:03:26 UTC
Don't localize the JS-exposed string.
Comment 5 Anne 2015-09-05 04:20:32 UTC
If we actually want to follow that through, it seems that JavaScript should make these fixed first, no?
Comment 6 Domenic Denicola 2015-09-05 23:05:26 UTC
I agree with comment 1 in general and don't see a need for this.
Comment 7 Simon Pieters 2015-09-07 09:13:48 UTC
(In reply to Anne from comment #5)
> If we actually want to follow that through, it seems that JavaScript should
> make these fixed first, no?

Yeah sure.

(In reply to Domenic Denicola from comment #6)
> I agree with comment 1 in general and don't see a need for this.

OK, let's drop this.