From 865d9ddd51dcc8776bf8c3976057e2f29a1a5af2 Mon Sep 17 00:00:00 2001 From: Yusuke Tanaka Date: Mon, 26 Jul 2021 20:52:59 +0900 Subject: refactor: use `primordials` in runtime, extensions and core (#11500) --- extensions/web/01_dom_exception.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'extensions/web/01_dom_exception.js') 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); -- cgit v1.2.3