Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
convertInherit(obj, ret, { context = "The provided value" } = {}) {
EventListenerOptions.convertInherit(obj, ret, { context });
{
const key = "once";
let value = obj === undefined || obj === null ? undefined : obj[key];
if (value !== undefined) {
value = conversions["boolean"](value, { context: context + " has member once that" });
ret[key] = value;
} else {
ret[key] = false;
}
}
},
set(V) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
V = conversions["boolean"](V, {
context: "Failed to set the 'declare' property on 'HTMLObjectElement': The provided value"
});
if (V) {
this.setAttribute("declare", "");
} else {
this.removeAttribute("declare");
}
},
set(V) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
V = conversions["boolean"](V, {
context: "Failed to set the 'hidden' property on 'HTMLElement': The provided value"
});
if (V) {
this.setAttribute("hidden", "");
} else {
this.removeAttribute("hidden");
}
},
}
{
let curArg = arguments[7];
if (curArg !== undefined) {
curArg = conversions["boolean"](curArg, {
context: "Failed to execute 'initKeyboardEvent' on 'KeyboardEvent': parameter 8"
});
} else {
curArg = false;
}
args.push(curArg);
}
{
let curArg = arguments[8];
if (curArg !== undefined) {
curArg = conversions["boolean"](curArg, {
context: "Failed to execute 'initKeyboardEvent' on 'KeyboardEvent': parameter 9"
});
} else {
curArg = false;
}
args.push(curArg);
}
{
let curArg = arguments[9];
if (curArg !== undefined) {
curArg = conversions["boolean"](curArg, {
context: "Failed to execute 'initKeyboardEvent' on 'KeyboardEvent': parameter 10"
});
} else {
curArg = false;
}
set disabled(V) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
V = conversions["boolean"](V, {
context: "Failed to set the 'disabled' property on 'HTMLButtonElement': The provided value"
});
if (V) {
this.setAttributeNS(null, "disabled", "");
} else {
this.removeAttributeNS(null, "disabled");
}
}
set(V) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
V = conversions["boolean"](V, {
context: "Failed to set the 'noHref' property on 'HTMLAreaElement': The provided value"
});
if (V) {
this.setAttribute("noHref", "");
} else {
this.removeAttribute("noHref");
}
},
set(V) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
V = conversions["boolean"](V, {
context: "Failed to set the 'readOnly' property on 'HTMLInputElement': The provided value"
});
if (V) {
this.setAttribute("readOnly", "");
} else {
this.removeAttribute("readOnly");
}
},
set(V) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
V = conversions["boolean"](V, {
context: "Failed to set the 'noValidate' property on 'HTMLFormElement': The provided value"
});
if (V) {
this.setAttribute("noValidate", "");
} else {
this.removeAttribute("noValidate");
}
},
let curArg = arguments[2];
if (curArg !== undefined) {
if (curArg === null || curArg === undefined) {
curArg = convertEventListenerOptions(curArg, {
context: "Failed to execute 'removeEventListener' on 'EventTarget': parameter 3"
});
} else if (utils.isObject(curArg)) {
curArg = convertEventListenerOptions(curArg, {
context: "Failed to execute 'removeEventListener' on 'EventTarget': parameter 3" + " dictionary"
});
} else if (typeof curArg === "boolean") {
curArg = conversions["boolean"](curArg, {
context: "Failed to execute 'removeEventListener' on 'EventTarget': parameter 3"
});
} else {
curArg = conversions["boolean"](curArg, {
context: "Failed to execute 'removeEventListener' on 'EventTarget': parameter 3"
});
}
}
args.push(curArg);
}
return this[impl].removeEventListener(...args);
};
set(V) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
V = conversions["boolean"](V, {
context: "Failed to set the 'noWrap' property on 'HTMLTableCellElement': The provided value"
});
if (V) {
this.setAttribute("noWrap", "");
} else {
this.removeAttribute("noWrap");
}
},