Skip to content

Commit 23a767d

Browse files
committed
fixup! Add DOMException cause
1 parent 01f2c6d commit 23a767d

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

index.bs

+6-9
Original file line numberDiff line numberDiff line change
@@ -14562,13 +14562,13 @@ fragment:
1456214562

1456314563
dictionary DOMExceptionOptions {
1456414564
any cause;
14565-
DOMString name;
14565+
DOMString name = "Error";
1456614566
};
1456714567

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

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

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

0 commit comments

Comments
 (0)