jsdom
Version:
A JavaScript implementation of many web standards
1,610 lines (1,292 loc) • 87.9 kB
JavaScript
"use strict";
const conversions = require("webidl-conversions");
const utils = require("./utils.js");
const EventHandlerNonNull = require("./EventHandlerNonNull.js");
const OnErrorEventHandlerNonNull = require("./OnErrorEventHandlerNonNull.js");
const ceReactionsPreSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPreSteps;
const ceReactionsPostSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPostSteps;
const implSymbol = utils.implSymbol;
const ctorRegistrySymbol = utils.ctorRegistrySymbol;
const Element = require("./Element.js");
const interfaceName = "SVGElement";
exports.is = value => {
return utils.isObject(value) && utils.hasOwn(value, implSymbol) && value[implSymbol] instanceof Impl.implementation;
};
exports.isImpl = value => {
return utils.isObject(value) && value instanceof Impl.implementation;
};
exports.convert = (globalObject, value, { context = "The provided value" } = {}) => {
if (exports.is(value)) {
return utils.implForWrapper(value);
}
throw new globalObject.TypeError(`${context} is not of type 'SVGElement'.`);
};
function makeWrapper(globalObject, newTarget) {
let proto;
if (newTarget !== undefined) {
proto = newTarget.prototype;
}
if (!utils.isObject(proto)) {
proto = globalObject[ctorRegistrySymbol]["SVGElement"].prototype;
}
return Object.create(proto);
}
exports.create = (globalObject, constructorArgs, privateData) => {
const wrapper = makeWrapper(globalObject);
return exports.setup(wrapper, globalObject, constructorArgs, privateData);
};
exports.createImpl = (globalObject, constructorArgs, privateData) => {
const wrapper = exports.create(globalObject, constructorArgs, privateData);
return utils.implForWrapper(wrapper);
};
exports._internalSetup = (wrapper, globalObject) => {
Element._internalSetup(wrapper, globalObject);
};
exports.setup = (wrapper, globalObject, constructorArgs = [], privateData = {}) => {
privateData.wrapper = wrapper;
exports._internalSetup(wrapper, globalObject);
Object.defineProperty(wrapper, implSymbol, {
value: new Impl.implementation(globalObject, constructorArgs, privateData),
configurable: true
});
wrapper[implSymbol][utils.wrapperSymbol] = wrapper;
if (Impl.init) {
Impl.init(wrapper[implSymbol]);
}
return wrapper;
};
exports.new = (globalObject, newTarget) => {
const wrapper = makeWrapper(globalObject, newTarget);
exports._internalSetup(wrapper, globalObject);
Object.defineProperty(wrapper, implSymbol, {
value: Object.create(Impl.implementation.prototype),
configurable: true
});
wrapper[implSymbol][utils.wrapperSymbol] = wrapper;
if (Impl.init) {
Impl.init(wrapper[implSymbol]);
}
return wrapper[implSymbol];
};
const exposed = new Set(["Window"]);
exports.install = (globalObject, globalNames) => {
if (!globalNames.some(globalName => exposed.has(globalName))) {
return;
}
const ctorRegistry = utils.initCtorRegistry(globalObject);
class SVGElement extends globalObject.Element {
constructor() {
throw new globalObject.TypeError("Illegal constructor");
}
focus() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError("'focus' called on an object that is not a valid instance of SVGElement.");
}
return esValue[implSymbol].focus();
}
blur() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError("'blur' called on an object that is not a valid instance of SVGElement.");
}
return esValue[implSymbol].blur();
}
get className() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get className' called on an object that is not a valid instance of SVGElement."
);
}
return utils.getSameObject(this, "className", () => {
return utils.tryWrapperForImpl(esValue[implSymbol]["className"]);
});
}
get ownerSVGElement() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get ownerSVGElement' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["ownerSVGElement"]);
}
get viewportElement() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get viewportElement' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["viewportElement"]);
}
get style() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError("'get style' called on an object that is not a valid instance of SVGElement.");
}
return utils.getSameObject(this, "style", () => {
return utils.tryWrapperForImpl(esValue[implSymbol]["style"]);
});
}
set style(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError("'set style' called on an object that is not a valid instance of SVGElement.");
}
const Q = esValue["style"];
if (!utils.isObject(Q)) {
throw new globalObject.TypeError("Property 'style' is not an object");
}
Reflect.set(Q, "cssText", V);
}
get onabort() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onabort' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onabort"]);
}
set onabort(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onabort' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onabort' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onabort"] = V;
}
get onauxclick() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onauxclick' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onauxclick"]);
}
set onauxclick(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onauxclick' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onauxclick' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onauxclick"] = V;
}
get onbeforeinput() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onbeforeinput' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onbeforeinput"]);
}
set onbeforeinput(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onbeforeinput' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onbeforeinput' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onbeforeinput"] = V;
}
get onbeforematch() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onbeforematch' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onbeforematch"]);
}
set onbeforematch(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onbeforematch' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onbeforematch' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onbeforematch"] = V;
}
get onbeforetoggle() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onbeforetoggle' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onbeforetoggle"]);
}
set onbeforetoggle(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onbeforetoggle' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onbeforetoggle' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onbeforetoggle"] = V;
}
get onblur() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onblur' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onblur"]);
}
set onblur(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onblur' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onblur' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onblur"] = V;
}
get oncancel() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get oncancel' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["oncancel"]);
}
set oncancel(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set oncancel' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'oncancel' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["oncancel"] = V;
}
get oncanplay() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get oncanplay' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["oncanplay"]);
}
set oncanplay(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set oncanplay' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'oncanplay' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["oncanplay"] = V;
}
get oncanplaythrough() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get oncanplaythrough' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["oncanplaythrough"]);
}
set oncanplaythrough(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set oncanplaythrough' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'oncanplaythrough' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["oncanplaythrough"] = V;
}
get onchange() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onchange' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onchange"]);
}
set onchange(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onchange' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onchange' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onchange"] = V;
}
get onclick() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onclick' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onclick"]);
}
set onclick(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onclick' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onclick' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onclick"] = V;
}
get onclose() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onclose' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onclose"]);
}
set onclose(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onclose' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onclose' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onclose"] = V;
}
get oncontextlost() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get oncontextlost' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["oncontextlost"]);
}
set oncontextlost(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set oncontextlost' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'oncontextlost' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["oncontextlost"] = V;
}
get oncontextmenu() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get oncontextmenu' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["oncontextmenu"]);
}
set oncontextmenu(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set oncontextmenu' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'oncontextmenu' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["oncontextmenu"] = V;
}
get oncontextrestored() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get oncontextrestored' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["oncontextrestored"]);
}
set oncontextrestored(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set oncontextrestored' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'oncontextrestored' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["oncontextrestored"] = V;
}
get oncopy() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get oncopy' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["oncopy"]);
}
set oncopy(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set oncopy' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'oncopy' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["oncopy"] = V;
}
get oncuechange() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get oncuechange' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["oncuechange"]);
}
set oncuechange(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set oncuechange' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'oncuechange' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["oncuechange"] = V;
}
get oncut() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError("'get oncut' called on an object that is not a valid instance of SVGElement.");
}
return utils.tryWrapperForImpl(esValue[implSymbol]["oncut"]);
}
set oncut(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError("'set oncut' called on an object that is not a valid instance of SVGElement.");
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'oncut' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["oncut"] = V;
}
get ondblclick() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get ondblclick' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["ondblclick"]);
}
set ondblclick(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set ondblclick' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'ondblclick' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["ondblclick"] = V;
}
get ondrag() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get ondrag' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["ondrag"]);
}
set ondrag(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set ondrag' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'ondrag' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["ondrag"] = V;
}
get ondragend() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get ondragend' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["ondragend"]);
}
set ondragend(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set ondragend' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'ondragend' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["ondragend"] = V;
}
get ondragenter() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get ondragenter' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["ondragenter"]);
}
set ondragenter(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set ondragenter' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'ondragenter' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["ondragenter"] = V;
}
get ondragleave() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get ondragleave' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["ondragleave"]);
}
set ondragleave(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set ondragleave' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'ondragleave' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["ondragleave"] = V;
}
get ondragover() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get ondragover' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["ondragover"]);
}
set ondragover(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set ondragover' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'ondragover' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["ondragover"] = V;
}
get ondragstart() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get ondragstart' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["ondragstart"]);
}
set ondragstart(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set ondragstart' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'ondragstart' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["ondragstart"] = V;
}
get ondrop() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get ondrop' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["ondrop"]);
}
set ondrop(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set ondrop' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'ondrop' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["ondrop"] = V;
}
get ondurationchange() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get ondurationchange' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["ondurationchange"]);
}
set ondurationchange(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set ondurationchange' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'ondurationchange' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["ondurationchange"] = V;
}
get onemptied() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onemptied' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onemptied"]);
}
set onemptied(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onemptied' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onemptied' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onemptied"] = V;
}
get onended() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onended' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onended"]);
}
set onended(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onended' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onended' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onended"] = V;
}
get onerror() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onerror' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onerror"]);
}
set onerror(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onerror' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = OnErrorEventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onerror' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onerror"] = V;
}
get onfocus() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onfocus' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onfocus"]);
}
set onfocus(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onfocus' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onfocus' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onfocus"] = V;
}
get onformdata() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onformdata' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onformdata"]);
}
set onformdata(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onformdata' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onformdata' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onformdata"] = V;
}
get oninput() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get oninput' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["oninput"]);
}
set oninput(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set oninput' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'oninput' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["oninput"] = V;
}
get oninvalid() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get oninvalid' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["oninvalid"]);
}
set oninvalid(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set oninvalid' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'oninvalid' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["oninvalid"] = V;
}
get onkeydown() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onkeydown' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onkeydown"]);
}
set onkeydown(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onkeydown' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onkeydown' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onkeydown"] = V;
}
get onkeypress() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onkeypress' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onkeypress"]);
}
set onkeypress(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onkeypress' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onkeypress' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onkeypress"] = V;
}
get onkeyup() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onkeyup' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onkeyup"]);
}
set onkeyup(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onkeyup' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onkeyup' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onkeyup"] = V;
}
get onload() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onload' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onload"]);
}
set onload(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onload' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onload' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onload"] = V;
}
get onloadeddata() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onloadeddata' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onloadeddata"]);
}
set onloadeddata(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onloadeddata' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onloadeddata' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onloadeddata"] = V;
}
get onloadedmetadata() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onloadedmetadata' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onloadedmetadata"]);
}
set onloadedmetadata(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onloadedmetadata' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onloadedmetadata' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onloadedmetadata"] = V;
}
get onloadstart() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onloadstart' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onloadstart"]);
}
set onloadstart(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onloadstart' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onloadstart' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onloadstart"] = V;
}
get onmousedown() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onmousedown' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onmousedown"]);
}
set onmousedown(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onmousedown' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onmousedown' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onmousedown"] = V;
}
get onmouseenter() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
return;
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onmouseenter"]);
}
set onmouseenter(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
return;
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onmouseenter' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onmouseenter"] = V;
}
get onmouseleave() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
return;
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onmouseleave"]);
}
set onmouseleave(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
return;
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onmouseleave' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onmouseleave"] = V;
}
get onmousemove() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onmousemove' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onmousemove"]);
}
set onmousemove(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onmousemove' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onmousemove' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onmousemove"] = V;
}
get onmouseout() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onmouseout' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onmouseout"]);
}
set onmouseout(V) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'set onmouseout' called on an object that is not a valid instance of SVGElement."
);
}
if (!utils.isObject(V)) {
V = null;
} else {
V = EventHandlerNonNull.convert(globalObject, V, {
context: "Failed to set the 'onmouseout' property on 'SVGElement': The provided value"
});
}
esValue[implSymbol]["onmouseout"] = V;
}
get onmouseover() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new globalObject.TypeError(
"'get onmouseover' called on an object that is not a valid instance of SVGElement."
);
}
return utils.tryWrapperForImpl(esValue[implSymbol]["onmouseover"]);
}
set onmouseover(V) {
const esValue = this !== null && this !== undefined ? this : globalO