summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/internal/event_target.mjs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2023-03-23 10:01:07 -0400
committerGitHub <noreply@github.com>2023-03-23 10:01:07 -0400
commita3529d02329e0d2127ad2a5bb78b4c476ddd6984 (patch)
treee49cbc9ba875c963daa8333bda4bc44b2c1b5300 /ext/node/polyfills/internal/event_target.mjs
parent64602e70271750c5420d53f2189bf1286ce13fba (diff)
refactor(ext/node): Use Deno.inspect (#17960)
No need for two almost identical implementations of the same thing --------- Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com> Co-authored-by: Aapo Alasuutari <aapo.alasuutari@gmail.com>
Diffstat (limited to 'ext/node/polyfills/internal/event_target.mjs')
-rw-r--r--ext/node/polyfills/internal/event_target.mjs4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/node/polyfills/internal/event_target.mjs b/ext/node/polyfills/internal/event_target.mjs
index cb3f356d0..cad1ec5a4 100644
--- a/ext/node/polyfills/internal/event_target.mjs
+++ b/ext/node/polyfills/internal/event_target.mjs
@@ -19,6 +19,8 @@ import {
} from "ext:deno_node/internal/util.mjs";
import { inspect } from "ext:deno_node/util.ts";
+const { ObjectAssign } = globalThis.__bootstrap.primordials;
+
const kIsEventTarget = Symbol.for("nodejs.event_target");
const kIsNodeEventTarget = Symbol("kIsNodeEventTarget");
@@ -95,7 +97,7 @@ class Event extends WebEvent {
return name;
}
- const opts = Object.assign({}, options, {
+ const opts = ObjectAssign({}, options, {
depth: NumberIsInteger(options.depth) ? options.depth - 1 : options.depth,
});