Skip to content

Commit

Permalink
fixup! lib: fix WebIDL object and dictionary type conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
ExE-Boss committed Feb 5, 2021
1 parent b6eb2bd commit 4762372
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/internal/event_target.js
Expand Up @@ -88,15 +88,20 @@ class Event {
validateObject(options, 'options', {
allowArray: true, allowFunction: true, nullable: true,
});
const { cancelable, bubbles, composed } = { ...options };
const {
cancelable,
bubbles,
composed,
[kTrustEvent]: trustEvent,
} = { ...options };
this[kCancelable] = !!cancelable;
this[kBubbles] = !!bubbles;
this[kComposed] = !!composed;
this[kType] = `${type}`;
this[kDefaultPrevented] = false;
this[kTimestamp] = lazyNow();
this[kPropagationStopped] = false;
if (options?.[kTrustEvent]) {
if (trustEvent) {
isTrustedSet.add(this);
}

Expand Down

0 comments on commit 4762372

Please sign in to comment.