Skip to content

Commit

Permalink
Add [[ErrorData]] slot to DOMExceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb authored Dec 12, 2024
1 parent 20f6212 commit acbbd5f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -13538,8 +13538,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|.
Expand Down Expand Up @@ -14553,6 +14554,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 <code>stack</code> property),
Expand Down

0 comments on commit acbbd5f

Please sign in to comment.