diff --git a/index.bs b/index.bs index 310cc9878..4c5dd37ba 100644 --- a/index.bs +++ b/index.bs @@ -14559,10 +14559,16 @@ The {{DOMException}} type is an [=interface type=] defined by the following IDL fragment:
+ +dictionary DOMExceptionOptions { + any cause; + DOMString name; +}; + [Exposed=(Window,Worker), Serializable] interface DOMException { // but see below note about ECMAScript binding - constructor(optional DOMString message = "", optional DOMString name = "Error"); + constructor(optional DOMString message = "", optional (DOMString or DOMExceptionOptions) nameOrOptions = "Error"); readonly attribute DOMString name; readonly attribute DOMString message; readonly attribute unsigned short code; @@ -14602,11 +14608,19 @@ Each {{DOMException}} object has an associated namemessage, both [=strings=]. The -new DOMException(|message|, |name|)
+ +new DOMException(|message|, |nameOrOptions|)
+ constructor steps are: -1. Set [=this=]'s [=DOMException/name=] to |name|. -1. Set [=this=]'s [=DOMException/message=] to |message|. +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 [=?=] InstallErrorCause([=this=], |nameOrOptions|). Thename
getter steps are to return [=this=]'s [=DOMException/name=].