summaryrefslogtreecommitdiff
path: root/ext/webidl/00_webidl.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/webidl/00_webidl.js')
-rw-r--r--ext/webidl/00_webidl.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/webidl/00_webidl.js b/ext/webidl/00_webidl.js
index a7f0597b1..d9c4f87cf 100644
--- a/ext/webidl/00_webidl.js
+++ b/ext/webidl/00_webidl.js
@@ -57,6 +57,7 @@
ReflectApply,
ReflectDefineProperty,
ReflectGetOwnPropertyDescriptor,
+ ReflectHas,
ReflectOwnKeys,
RegExpPrototypeTest,
Set,
@@ -648,7 +649,7 @@
const defaultValues = {};
for (const member of allMembers) {
- if ("defaultValue" in member) {
+ if (ReflectHas(member, "defaultValue")) {
const idlMemberValue = member.defaultValue;
const imvType = typeof idlMemberValue;
// Copy by value types can be directly assigned, copy by reference types
@@ -1013,13 +1014,16 @@
for (const key in descriptors) {
if (key === "constructor") continue;
const descriptor = descriptors[key];
- if ("value" in descriptor && typeof descriptor.value === "function") {
+ if (
+ ReflectHas(descriptor, "value") &&
+ typeof descriptor.value === "function"
+ ) {
ObjectDefineProperty(prototype.prototype, key, {
enumerable: true,
writable: true,
configurable: true,
});
- } else if ("get" in descriptor) {
+ } else if (ReflectHas(descriptor, "get")) {
ObjectDefineProperty(prototype.prototype, key, {
enumerable: true,
configurable: true,