From fa40209ccbbec9fba2e502c357e66420f63acf42 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Wed, 17 Jul 2024 21:11:38 -0700 Subject: [PATCH] add [[ErrorData]] slot to DOMExceptions --- index.bs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index aa214732..36408211 100644 --- a/index.bs +++ b/index.bs @@ -13532,8 +13532,9 @@ the realm given as an argument. 1. Let |targetRealm| be [=?=] [$GetFunctionRealm$](|newTarget|). 1. Set |prototype| to the [=interface prototype object=] for |interface| in |targetRealm|. - 1. Let |instance| be [$MakeBasicObject$]( - « \[[Prototype]], \[[Extensible]], \[[Realm]], \[[PrimaryInterface]] »). + 1. Let |slots| be « \[[Prototype]], \[[Extensible]], \[[Realm]], \[[PrimaryInterface]] ». + 1. If |interface| is {{DOMException}}, append \[[ErrorData]] to |slots|. + 1. Let |instance| be [$MakeBasicObject$](|slots|). 1. Set |instance|.\[[Realm]] to |realm|. 1. Set |instance|.\[[PrimaryInterface]] to |interface|. 1. Set |instance|.\[[Prototype]] to |prototype|. @@ -14547,6 +14548,7 @@ The [=class string=] of a [=namespace object=] is the [=namespace=]'s [=identifi In the JavaScript binding, the [=interface prototype object=] for {{DOMException}} has its \[[Prototype]] [=/internal slot=] set to the intrinsic object {{%Error.prototype%}}, as defined in the [=create an interface prototype object=] abstract operation. +It also has an \[[ErrorData]] slot, like all built-in exceptions. Additionally, if an implementation gives native {{Error}} objects special powers or nonstandard properties (such as a stack property),