Skip to content

Commit acbbd5f

Browse files
authored
Add [[ErrorData]] slot to DOMExceptions
Fixes tc39/proposal-is-error#9.
1 parent 20f6212 commit acbbd5f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

index.bs

+4-2
Original file line numberDiff line numberDiff line change
@@ -13538,8 +13538,9 @@ the realm given as an argument.
1353813538
1. Let |targetRealm| be [=?=] [$GetFunctionRealm$](|newTarget|).
1353913539
1. Set |prototype| to the [=interface prototype object=] for |interface| in
1354013540
|targetRealm|.
13541-
1. Let |instance| be [$MakeBasicObject$](
13542-
« \[[Prototype]], \[[Extensible]], \[[Realm]], \[[PrimaryInterface]] »).
13541+
1. Let |slots| be « \[[Prototype]], \[[Extensible]], \[[Realm]], \[[PrimaryInterface]] ».
13542+
1. If |interface| is {{DOMException}}, append \[[ErrorData]] to |slots|.
13543+
1. Let |instance| be [$MakeBasicObject$](|slots|).
1354313544
1. Set |instance|.\[[Realm]] to |realm|.
1354413545
1. Set |instance|.\[[PrimaryInterface]] to |interface|.
1354513546
1. Set |instance|.\[[Prototype]] to |prototype|.
@@ -14553,6 +14554,7 @@ The [=class string=] of a [=namespace object=] is the [=namespace=]'s [=identifi
1455314554
In the JavaScript binding, the [=interface prototype object=] for {{DOMException}}
1455414555
has its \[[Prototype]] [=/internal slot=] set to the intrinsic object {{%Error.prototype%}},
1455514556
as defined in the [=create an interface prototype object=] abstract operation.
14557+
It also has an \[[ErrorData]] slot, like all built-in exceptions.
1455614558

1455714559
Additionally, if an implementation gives native {{Error}} objects special powers or
1455814560
nonstandard properties (such as a <code>stack</code> property),

0 commit comments

Comments
 (0)