Skip to content

Commit 4762372

Browse files
committed
fixup! lib: fix WebIDL object and dictionary type conversion
1 parent b6eb2bd commit 4762372

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/internal/event_target.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,20 @@ class Event {
8888
validateObject(options, 'options', {
8989
allowArray: true, allowFunction: true, nullable: true,
9090
});
91-
const { cancelable, bubbles, composed } = { ...options };
91+
const {
92+
cancelable,
93+
bubbles,
94+
composed,
95+
[kTrustEvent]: trustEvent,
96+
} = { ...options };
9297
this[kCancelable] = !!cancelable;
9398
this[kBubbles] = !!bubbles;
9499
this[kComposed] = !!composed;
95100
this[kType] = `${type}`;
96101
this[kDefaultPrevented] = false;
97102
this[kTimestamp] = lazyNow();
98103
this[kPropagationStopped] = false;
99-
if (options?.[kTrustEvent]) {
104+
if (trustEvent) {
100105
isTrustedSet.add(this);
101106
}
102107

0 commit comments

Comments
 (0)