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 committed Jul 18, 2024
1 parent e7b2fe1 commit fa40209
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 @@ -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|.
Expand Down Expand Up @@ -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 <code>stack</code> property),
Expand Down

0 comments on commit fa40209

Please sign in to comment.