Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
throw new TypeError("Illegal invocation");
}
const args = [];
{
let curArg = arguments[0];
if (curArg !== undefined) {
curArg = conversions["DOMString"](curArg, {
context: "Failed to execute 'toDataURL' on 'HTMLCanvasElement': parameter 1"
});
}
args.push(curArg);
}
{
let curArg = arguments[1];
if (curArg !== undefined) {
curArg = conversions["any"](curArg, {
context: "Failed to execute 'toDataURL' on 'HTMLCanvasElement': parameter 2"
});
}
args.push(curArg);
}
return this[impl].toDataURL(...args);
};
throw new TypeError("Illegal invocation");
}
const args = [];
{
let curArg = arguments[0];
if (curArg !== undefined) {
curArg = conversions["DOMString"](curArg, {
context: "Failed to execute 'toDataURL' on 'HTMLCanvasElement': parameter 1"
});
}
args.push(curArg);
}
{
let curArg = arguments[1];
if (curArg !== undefined) {
curArg = conversions["any"](curArg, {
context: "Failed to execute 'toDataURL' on 'HTMLCanvasElement': parameter 2"
});
}
args.push(curArg);
}
return this[impl].toDataURL(...args);
};
"Failed to execute 'getContext' on 'HTMLCanvasElement': 1 argument required, but only " +
arguments.length +
" present."
);
}
const args = [];
{
let curArg = arguments[0];
curArg = conversions["DOMString"](curArg, {
context: "Failed to execute 'getContext' on 'HTMLCanvasElement': parameter 1"
});
args.push(curArg);
}
for (let i = 1; i < arguments.length; i++) {
let curArg = arguments[i];
curArg = conversions["any"](curArg, {
context: "Failed to execute 'getContext' on 'HTMLCanvasElement': parameter " + (i + 1)
});
args.push(curArg);
}
return utils.tryWrapperForImpl(this[impl].getContext(...args));
};
History.prototype.pushState = function pushState(data, title) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
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"
});
}
if (arguments.length < 2) {
throw new TypeError(
"Failed to execute 'set' on 'FormData': " + "2 arguments required, but only " + arguments.length + " present."
);
}
const args = [];
for (let i = 0; i < arguments.length && i < 3; ++i) {
args[i] = arguments[i];
}
args[0] = conversions["USVString"](args[0], { context: "Failed to execute 'set' on 'FormData': parameter 1" });
args[1] = conversions["any"](args[1], { context: "Failed to execute 'set' on 'FormData': parameter 2" });
if (args[2] !== undefined) {
args[2] = conversions["USVString"](args[2], { context: "Failed to execute 'set' on 'FormData': parameter 3" });
}
return this[impl].set(...args);
};
}
{
let curArg = arguments[2];
if (curArg !== undefined) {
curArg = conversions["boolean"](curArg, {
context: "Failed to execute 'initCustomEvent' on 'CustomEvent': parameter 3"
});
} else {
curArg = false;
}
args.push(curArg);
}
{
let curArg = arguments[3];
if (curArg !== undefined) {
curArg = conversions["any"](curArg, {
context: "Failed to execute 'initCustomEvent' on 'CustomEvent': parameter 4"
});
} else {
curArg = null;
}
args.push(curArg);
}
return this[impl].initCustomEvent(...args);
};
History.prototype.replaceState = function replaceState(data, title) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
if (arguments.length < 2) {
throw new TypeError(
"Failed to execute 'replaceState' on 'History': 2 arguments required, but only " + arguments.length + " present."
);
}
const args = [];
{
let curArg = arguments[0];
curArg = conversions["any"](curArg, { context: "Failed to execute 'replaceState' on 'History': parameter 1" });
args.push(curArg);
}
{
let curArg = arguments[1];
curArg = conversions["DOMString"](curArg, {
context: "Failed to execute 'replaceState' 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 'initCustomEvent' on 'CustomEvent': parameter 2"
});
} else {
args[1] = false;
}
if (args[2] !== undefined) {
args[2] = conversions["boolean"](args[2], {
context: "Failed to execute 'initCustomEvent' on 'CustomEvent': parameter 3"
});
} else {
args[2] = false;
}
if (args[3] !== undefined) {
args[3] = conversions["any"](args[3], {
context: "Failed to execute 'initCustomEvent' on 'CustomEvent': parameter 4"
});
} else {
args[3] = null;
}
return this[impl].initCustomEvent(...args);
};
"1 argument required, but only " +
arguments.length +
" present."
);
}
const args = [];
for (let i = 0; i < arguments.length; ++i) {
args[i] = arguments[i];
}
args[0] = conversions["DOMString"](args[0], {
context: "Failed to execute 'probablySupportsContext' on 'HTMLCanvasElement': parameter 1"
});
for (let i = 1; i < arguments.length; ++i) {
args[i] = conversions["any"](args[i], {
context: "Failed to execute 'probablySupportsContext' on 'HTMLCanvasElement': parameter " + (i + 1)
});
}
return this[impl].probablySupportsContext(...args);
};
context: "Failed to execute 'initMessageEvent' on 'MessageEvent': parameter 2"
});
} else {
args[1] = false;
}
if (args[2] !== undefined) {
args[2] = conversions["boolean"](args[2], {
context: "Failed to execute 'initMessageEvent' on 'MessageEvent': parameter 3"
});
} else {
args[2] = false;
}
if (args[3] !== undefined) {
args[3] = conversions["any"](args[3], {
context: "Failed to execute 'initMessageEvent' on 'MessageEvent': parameter 4"
});
} else {
args[3] = null;
}
if (args[4] !== undefined) {
args[4] = conversions["USVString"](args[4], {
context: "Failed to execute 'initMessageEvent' on 'MessageEvent': parameter 5"
});
} else {
args[4] = "";
}
if (args[5] !== undefined) {
args[5] = conversions["DOMString"](args[5], {