@@ -14559,10 +14559,16 @@ The {{DOMException}} type is an [=interface type=] defined by the following IDL
1455914559fragment:
1456014560
1456114561<pre class="idl">
14562+
14563+ dictionary DOMExceptionOptions {
14564+ any cause;
14565+ DOMString name = "Error";
14566+ };
14567+
1456214568[Exposed=(Window,Worker),
1456314569 Serializable]
1456414570interface DOMException { // but see below note about ECMAScript binding
14565- constructor(optional DOMString message = "", optional DOMString name = "Error" );
14571+ constructor(optional DOMString message = "", optional (DOMExceptionOptions or DOMString) options = {} );
1456614572 readonly attribute DOMString name;
1456714573 readonly attribute DOMString message;
1456814574 readonly attribute unsigned short code;
@@ -14602,11 +14608,14 @@ Each {{DOMException}} object has an associated <dfn for="DOMException">name</dfn
1460214608<dfn for="DOMException">message</dfn>, both [=strings=].
1460314609
1460414610The
14605- <dfn constructor for="DOMException" lt="DOMException(message, name )"><code>new DOMException(|message|, |name |)</code></dfn>
14611+ <dfn constructor for="DOMException" lt="DOMException(message, options )"><code>new DOMException(|message|, |options |)</code></dfn>
1460614612constructor steps are:
1460714613
14608- 1. Set [=this=]'s [=DOMException/name=] to |name|.
14609- 1. Set [=this=]'s [=DOMException/message=] to |message|.
14614+ 1. Set [=this=]'s [=DOMException/message=] to |message|.
14615+ 1. If |options| is a string, then set [=this=]'s [=DOMException/name=] to |options|.
14616+ 1. Otherwise,
14617+ 1. Set [=this=]'s [=DOMException/name=] to |options|["{{DOMExceptionOptions/name}}"].
14618+ 1. Perform [=?=] <a abstract-op>InstallErrorCause</a>([=this=], |options|).
1461014619
1461114620The <dfn attribute for="DOMException"><code>name</code></dfn> getter steps are to return
1461214621[=this=]'s [=DOMException/name=].
0 commit comments