We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2b80d19 commit 71249a6Copy full SHA for 71249a6
lib/internal/event_target.js
@@ -78,6 +78,13 @@ const isTrusted = ObjectGetOwnPropertyDescriptor({
78
}
79
}, 'isTrusted').get;
80
81
+const isTrustedDescriptor = {
82
+ __proto__: null,
83
+ configurable: false,
84
+ enumerable: true,
85
+ get: isTrusted,
86
+};
87
+
88
function isEvent(value) {
89
return typeof value?.[kType] === 'string';
90
@@ -113,12 +120,7 @@ class Event {
113
120
114
121
115
122
// isTrusted is special (LegacyUnforgeable)
116
- ObjectDefineProperty(this, 'isTrusted', {
117
- __proto__: null,
118
- get: isTrusted,
119
- enumerable: true,
- configurable: false
- });
123
+ ObjectDefineProperty(this, 'isTrusted', isTrustedDescriptor);
124
this[kTarget] = null;
125
this[kIsBeingDispatched] = false;
126
0 commit comments