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" } = {}) {
{
const key = "is";
let value = obj === undefined || obj === null ? undefined : obj[key];
if (value !== undefined) {
value = conversions["DOMString"](value, { context: context + " has member is that" });
ret[key] = value;
}
}
},
if (new.target === undefined) {
throw new TypeError(
"Failed to construct 'KeyboardEvent'. Please use the 'new' operator; this constructor " +
"cannot be called as a function."
);
}
if (arguments.length < 1) {
throw new TypeError(
"Failed to construct 'KeyboardEvent': 1 argument required, but only " + arguments.length + " present."
);
}
const args = [];
{
let curArg = arguments[0];
curArg = conversions["DOMString"](curArg, { context: "Failed to construct 'KeyboardEvent': parameter 1" });
args.push(curArg);
}
{
let curArg = arguments[1];
curArg = convertKeyboardEventInit(curArg, { context: "Failed to construct 'KeyboardEvent': parameter 2" });
args.push(curArg);
}
iface.setup(this, args);
}
before() {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
const args = [];
for (let i = 0; i < arguments.length; i++) {
let curArg = arguments[i];
if (isNode(curArg)) {
curArg = utils.implForWrapper(curArg);
} else {
curArg = conversions["DOMString"](curArg, {
context: "Failed to execute 'before' on 'DocumentType': parameter " + (i + 1)
});
}
args.push(curArg);
}
return this[impl].before(...args);
}
set(V) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
V = conversions["DOMString"](V, {
context: "Failed to set the 'title' property on 'Document': The provided value"
});
this[impl]["title"] = V;
},
set shape(V) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
V = conversions["DOMString"](V, {
context: "Failed to set the 'shape' property on 'HTMLAnchorElement': The provided value"
});
this.setAttributeNS(null, "shape", V);
}
set align(V) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
V = conversions["DOMString"](V, {
context: "Failed to set the 'align' property on 'HTMLEmbedElement': The provided value"
});
this.setAttributeNS(null, "align", V);
}
set(V) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
if (V === null || V === undefined) {
V = null;
} else {
V = conversions["DOMString"](V, {
context: "Failed to set the 'textContent' property on 'Node': The provided value"
});
}
this[impl]["textContent"] = V;
},
set(V) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
V = conversions["DOMString"](V, {
context: "Failed to set the 'frameBorder' property on 'HTMLFrameElement': The provided value"
});
this.setAttribute("frameBorder", V);
},
}
if (arguments.length < 2) {
throw new TypeError(
"Failed to execute 'pushState' on 'History': 2 arguments required, but only " + arguments.length + " present."
);
}
const args = [];
{
let curArg = arguments[0];
curArg = conversions["any"](curArg, { context: "Failed to execute 'pushState' on 'History': parameter 1" });
args.push(curArg);
}
{
let curArg = arguments[1];
curArg = conversions["DOMString"](curArg, { context: "Failed to execute 'pushState' on 'History': parameter 2" });
args.push(curArg);
}
{
let curArg = arguments[2];
if (curArg !== undefined) {
if (curArg === null || curArg === undefined) {
curArg = null;
} else {
curArg = conversions["USVString"](curArg, {
context: "Failed to execute 'pushState' on 'History': parameter 3"
});
}
} else {
curArg = null;
}
args.push(curArg);
set media(V) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
V = conversions["DOMString"](V, {
context: "Failed to set the 'media' property on 'HTMLLinkElement': The provided value"
});
this.setAttributeNS(null, "media", V);
}