whatwg / webidl

Web IDL Standard
https://webidl.spec.whatwg.org/
Other
409 stars 163 forks source link

Exception message does not supply language or direction metadata #1023

Open aphillips opened 3 years ago

aphillips commented 3 years ago

https://www.w3.org/TR/WebIDL/#dfn-DOMException

Exceptions have an error name, a DOMString, which is the type of error the exception represents, and a message, which is an optional, user agent-defined value that provides human readable details of the error.

The message attribute of DOMException does not include language or base direction metadata (see https://w3c.github.io/string-meta). Lack of this metadata can mean that the exception message is not properly rendered. While messages in DOMExceptions are often intended for developer debugging purposes, this is not always true--and developers are people (who speak a language) too.

[I18N-ACTION-1051]

domenic commented 3 years ago

This is by design, to follow how JavaScript works. I think we would not change anything here without first getting changes in the JavaScript specification, and then we would just follow their lead.

aphillips commented 3 years ago

My comment here covers this as well.