Skip to content

Commit

Permalink
fixup! Add DOMException cause
Browse files Browse the repository at this point in the history
  • Loading branch information
legendecas committed Sep 1, 2022
1 parent 01f2c6d commit 23a767d
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -14562,13 +14562,13 @@ fragment:

dictionary DOMExceptionOptions {
any cause;
DOMString name;
DOMString name = "Error";
};

[Exposed=(Window,Worker),
Serializable]
interface DOMException { // but see below note about ECMAScript binding
constructor(optional DOMString message = "", optional (DOMString or DOMExceptionOptions) nameOrOptions = "Error");
constructor(optional DOMString message = "", optional (DOMExceptionOptions or DOMString) options = {});
readonly attribute DOMString name;
readonly attribute DOMString message;
readonly attribute unsigned short code;
Expand Down Expand Up @@ -14614,13 +14614,10 @@ The
constructor steps are:

1. Set [=this=]'s [=DOMException/message=] to |message|.
1. If |nameOrOptions| is a String, set [=this=]'s [=DOMException/name=] to
|nameOrOptions|.
1. Else,
1. If |nameOrOptions|'name is present, set [=this=]'s [=DOMException/name=]
to |nameOrOptions|'s name, else set [=this=]'s [=DOMException/name=]
to "Error".
1. Perform [=?=] <a abstract-op>InstallErrorCause</a>([=this=], |nameOrOptions|).
1. If |options| is a string, then set [=this=]'s [=DOMException/name=] to |options|.
1. Otherwise,
1. Set [=this=]'s [=DOMException/name=] to |options|["{{DOMExceptionOptions/name}}"].
1. Perform [=?=] <a abstract-op>InstallErrorCause</a>([=this=], |options|).

The <dfn attribute for="DOMException"><code>name</code></dfn> getter steps are to return
[=this=]'s [=DOMException/name=].
Expand Down

0 comments on commit 23a767d

Please sign in to comment.