From 23a767d38f5c131fae74556f8f7c6100798707e9 Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Thu, 1 Sep 2022 09:39:21 +0000 Subject: [PATCH] fixup! Add DOMException cause --- index.bs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/index.bs b/index.bs index c1f4ea9e6..a1cc541f2 100644 --- a/index.bs +++ b/index.bs @@ -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; @@ -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 [=?=] InstallErrorCause([=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 [=?=] InstallErrorCause([=this=], |options|). The name getter steps are to return [=this=]'s [=DOMException/name=].