Skip to content

Commit

Permalink
message must be optional and default to ""
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic committed Oct 10, 2022
1 parent 9d3fbe5 commit 6242377
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -5372,8 +5372,9 @@ shape for developers. Specifically:
of the names in the [=error names table=].
* The [=interface=] must have a [=constructor operation=] which sets the instance's
[=DOMException/name=] to the interface's [=identifier=].
* Their [=constructor operation=] must take as its first parameter a {{DOMString}} named |message|,
and must set the instance's [=DOMException/message=] to |message|.
* Their [=constructor operation=] must take as its first parameter an [=optional=] {{DOMString}}
named |message| defaulting to the empty string, and must set the instance's
[=DOMException/message=] to |message|.
* Their [=constructor operation=] should take as its second parameter a [=dictionary=] containing
the additional information that needs to be exposed.
* They should have [=read only=] [=attributes=], whose names are the same as the members of the
Expand All @@ -5392,7 +5393,7 @@ interfaces will always return 0.
<pre highlight=webidl>
[Exposed=Window]
interface WidgetError : DOMException {
constructor(DOMString message, WidgetErrorOptions options);
constructor(optional DOMString message = "", WidgetErrorOptions options);

readonly attribute unsigned long long hardwareErrorCode;
};
Expand Down

0 comments on commit 6242377

Please sign in to comment.