summaryrefslogtreecommitdiff
path: root/extensions/web/01_dom_exception.js
diff options
context:
space:
mode:
authorYusuke Tanaka <yusuktan@maguro.dev>2021-07-26 20:52:59 +0900
committerGitHub <noreply@github.com>2021-07-26 13:52:59 +0200
commit865d9ddd51dcc8776bf8c3976057e2f29a1a5af2 (patch)
treeecaf2293a4534726c56722875c628ea14bfad559 /extensions/web/01_dom_exception.js
parentdf26a3563edd501380d5d5da5138eb67acb06645 (diff)
refactor: use `primordials` in runtime, extensions and core (#11500)
Diffstat (limited to 'extensions/web/01_dom_exception.js')
-rw-r--r--extensions/web/01_dom_exception.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/extensions/web/01_dom_exception.js b/extensions/web/01_dom_exception.js
index 3e282d969..c6f60ae2f 100644
--- a/extensions/web/01_dom_exception.js
+++ b/extensions/web/01_dom_exception.js
@@ -11,10 +11,12 @@
((window) => {
const {
- Error,
+ ErrorPrototype,
ObjectDefineProperty,
ObjectEntries,
ObjectSetPrototypeOf,
+ SymbolFor,
+ SymbolToStringTag,
} = window.__bootstrap.primordials;
const webidl = window.__bootstrap.webidl;
const consoleInternal = window.__bootstrap.console;
@@ -106,11 +108,11 @@
return this.#code;
}
- get [Symbol.toStringTag]() {
+ get [SymbolToStringTag]() {
return "DOMException";
}
- [Symbol.for("Deno.customInspect")](inspect) {
+ [SymbolFor("Deno.customInspect")](inspect) {
if (this instanceof DOMException) {
return `DOMException: ${this.#message}`;
} else {
@@ -127,7 +129,7 @@
}
}
- ObjectSetPrototypeOf(DOMException.prototype, Error.prototype);
+ ObjectSetPrototypeOf(DOMException.prototype, ErrorPrototype);
webidl.configurePrototype(DOMException);