"use strict"; const conversions = require("webidl-conversions"); const utils = require("./utils.js"); const HTMLConstructor_helpers_html_constructor = require("../helpers/html-constructor.js").HTMLConstructor; const ceReactionsPreSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPreSteps; const ceReactionsPostSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPostSteps; const impl = utils.implSymbol; const ctorRegistry = utils.ctorRegistrySymbol; const Element = require("./Element.js"); const interfaceName = "HTMLElement"; /** * When an interface-module that implements this interface as a mixin is loaded, it will append its own `.is()` * method into this array. It allows objects that directly implements *those* interfaces to be recognized as * implementing this mixin interface. */ exports._mixedIntoPredicates = []; exports.is = function is(obj) { if (obj) { if (utils.hasOwn(obj, impl) && obj[impl] instanceof Impl.implementation) { return true; } for (const isMixedInto of exports._mixedIntoPredicates) { if (isMixedInto(obj)) { return true; } } } return false; }; exports.isImpl = function isImpl(obj) { if (obj) { if (obj instanceof Impl.implementation) { return true; } const wrapper = utils.wrapperForImpl(obj); for (const isMixedInto of exports._mixedIntoPredicates) { if (isMixedInto(wrapper)) { return true; } } } return false; }; exports.convert = function convert(obj, { context = "The provided value" } = {}) { if (exports.is(obj)) { return utils.implForWrapper(obj); } throw new TypeError(`${context} is not of type 'HTMLElement'.`); }; exports.create = function create(globalObject, constructorArgs, privateData) { if (globalObject[ctorRegistry] === undefined) { throw new Error("Internal error: invalid global object"); } const ctor = globalObject[ctorRegistry]["HTMLElement"]; if (ctor === undefined) { throw new Error("Internal error: constructor HTMLElement is not installed on the passed global object"); } let obj = Object.create(ctor.prototype); obj = exports.setup(obj, globalObject, constructorArgs, privateData); return obj; }; exports.createImpl = function createImpl(globalObject, constructorArgs, privateData) { const obj = exports.create(globalObject, constructorArgs, privateData); return utils.implForWrapper(obj); }; exports._internalSetup = function _internalSetup(obj) { Element._internalSetup(obj); }; exports.setup = function setup(obj, globalObject, constructorArgs = [], privateData = {}) { privateData.wrapper = obj; exports._internalSetup(obj); Object.defineProperty(obj, impl, { value: new Impl.implementation(globalObject, constructorArgs, privateData), configurable: true }); obj[impl][utils.wrapperSymbol] = obj; if (Impl.init) { Impl.init(obj[impl], privateData); } return obj; }; exports.install = function install(globalObject) { if (globalObject.Element === undefined) { throw new Error("Internal error: attempting to evaluate HTMLElement before Element"); } class HTMLElement extends globalObject.Element { constructor() { return HTMLConstructor_helpers_html_constructor(globalObject, interfaceName, new.target); } click() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return this[impl].click(); } focus() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return this[impl].focus(); } blur() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return this[impl].blur(); } get title() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } ceReactionsPreSteps_helpers_custom_elements(globalObject); try { const value = this[impl].getAttributeNS(null, "title"); return value === null ? "" : value; } finally { ceReactionsPostSteps_helpers_custom_elements(globalObject); } } set title(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = conversions["DOMString"](V, { context: "Failed to set the 'title' property on 'HTMLElement': The provided value" }); ceReactionsPreSteps_helpers_custom_elements(globalObject); try { this[impl].setAttributeNS(null, "title", V); } finally { ceReactionsPostSteps_helpers_custom_elements(globalObject); } } get lang() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } ceReactionsPreSteps_helpers_custom_elements(globalObject); try { const value = this[impl].getAttributeNS(null, "lang"); return value === null ? "" : value; } finally { ceReactionsPostSteps_helpers_custom_elements(globalObject); } } set lang(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = conversions["DOMString"](V, { context: "Failed to set the 'lang' property on 'HTMLElement': The provided value" }); ceReactionsPreSteps_helpers_custom_elements(globalObject); try { this[impl].setAttributeNS(null, "lang", V); } finally { ceReactionsPostSteps_helpers_custom_elements(globalObject); } } get translate() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } ceReactionsPreSteps_helpers_custom_elements(globalObject); try { return this[impl]["translate"]; } finally { ceReactionsPostSteps_helpers_custom_elements(globalObject); } } set translate(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = conversions["boolean"](V, { context: "Failed to set the 'translate' property on 'HTMLElement': The provided value" }); ceReactionsPreSteps_helpers_custom_elements(globalObject); try { this[impl]["translate"] = V; } finally { ceReactionsPostSteps_helpers_custom_elements(globalObject); } } get dir() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } ceReactionsPreSteps_helpers_custom_elements(globalObject); try { return this[impl]["dir"]; } finally { ceReactionsPostSteps_helpers_custom_elements(globalObject); } } set dir(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = conversions["DOMString"](V, { context: "Failed to set the 'dir' property on 'HTMLElement': The provided value" }); ceReactionsPreSteps_helpers_custom_elements(globalObject); try { this[impl]["dir"] = V; } finally { ceReactionsPostSteps_helpers_custom_elements(globalObject); } } get hidden() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } ceReactionsPreSteps_helpers_custom_elements(globalObject); try { return this[impl].hasAttributeNS(null, "hidden"); } finally { ceReactionsPostSteps_helpers_custom_elements(globalObject); } } set hidden(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = conversions["boolean"](V, { context: "Failed to set the 'hidden' property on 'HTMLElement': The provided value" }); ceReactionsPreSteps_helpers_custom_elements(globalObject); try { if (V) { this[impl].setAttributeNS(null, "hidden", ""); } else { this[impl].removeAttributeNS(null, "hidden"); } } finally { ceReactionsPostSteps_helpers_custom_elements(globalObject); } } get accessKey() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } ceReactionsPreSteps_helpers_custom_elements(globalObject); try { const value = this[impl].getAttributeNS(null, "accesskey"); return value === null ? "" : value; } finally { ceReactionsPostSteps_helpers_custom_elements(globalObject); } } set accessKey(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = conversions["DOMString"](V, { context: "Failed to set the 'accessKey' property on 'HTMLElement': The provided value" }); ceReactionsPreSteps_helpers_custom_elements(globalObject); try { this[impl].setAttributeNS(null, "accesskey", V); } finally { ceReactionsPostSteps_helpers_custom_elements(globalObject); } } get draggable() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } ceReactionsPreSteps_helpers_custom_elements(globalObject); try { return this[impl]["draggable"]; } finally { ceReactionsPostSteps_helpers_custom_elements(globalObject); } } set draggable(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = conversions["boolean"](V, { context: "Failed to set the 'draggable' property on 'HTMLElement': The provided value" }); ceReactionsPreSteps_helpers_custom_elements(globalObject); try { this[impl]["draggable"] = V; } finally { ceReactionsPostSteps_helpers_custom_elements(globalObject); } } get offsetParent() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["offsetParent"]); } get offsetTop() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return this[impl]["offsetTop"]; } get offsetLeft() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return this[impl]["offsetLeft"]; } get offsetWidth() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return this[impl]["offsetWidth"]; } get offsetHeight() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return this[impl]["offsetHeight"]; } get style() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.getSameObject(this, "style", () => { return utils.tryWrapperForImpl(this[impl]["style"]); }); } set style(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } this.style.cssText = V; } get onabort() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onabort"]); } set onabort(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onabort"] = V; } get onauxclick() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onauxclick"]); } set onauxclick(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onauxclick"] = V; } get onblur() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onblur"]); } set onblur(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onblur"] = V; } get oncancel() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["oncancel"]); } set oncancel(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["oncancel"] = V; } get oncanplay() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["oncanplay"]); } set oncanplay(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["oncanplay"] = V; } get oncanplaythrough() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["oncanplaythrough"]); } set oncanplaythrough(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["oncanplaythrough"] = V; } get onchange() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onchange"]); } set onchange(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onchange"] = V; } get onclick() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onclick"]); } set onclick(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onclick"] = V; } get onclose() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onclose"]); } set onclose(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onclose"] = V; } get oncontextmenu() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["oncontextmenu"]); } set oncontextmenu(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["oncontextmenu"] = V; } get oncuechange() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["oncuechange"]); } set oncuechange(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["oncuechange"] = V; } get ondblclick() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["ondblclick"]); } set ondblclick(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["ondblclick"] = V; } get ondrag() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["ondrag"]); } set ondrag(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["ondrag"] = V; } get ondragend() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["ondragend"]); } set ondragend(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["ondragend"] = V; } get ondragenter() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["ondragenter"]); } set ondragenter(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["ondragenter"] = V; } get ondragexit() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["ondragexit"]); } set ondragexit(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["ondragexit"] = V; } get ondragleave() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["ondragleave"]); } set ondragleave(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["ondragleave"] = V; } get ondragover() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["ondragover"]); } set ondragover(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["ondragover"] = V; } get ondragstart() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["ondragstart"]); } set ondragstart(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["ondragstart"] = V; } get ondrop() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["ondrop"]); } set ondrop(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["ondrop"] = V; } get ondurationchange() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["ondurationchange"]); } set ondurationchange(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["ondurationchange"] = V; } get onemptied() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onemptied"]); } set onemptied(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onemptied"] = V; } get onended() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onended"]); } set onended(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onended"] = V; } get onerror() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onerror"]); } set onerror(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onerror"] = V; } get onfocus() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onfocus"]); } set onfocus(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onfocus"] = V; } get oninput() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["oninput"]); } set oninput(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["oninput"] = V; } get oninvalid() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["oninvalid"]); } set oninvalid(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["oninvalid"] = V; } get onkeydown() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onkeydown"]); } set onkeydown(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onkeydown"] = V; } get onkeypress() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onkeypress"]); } set onkeypress(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onkeypress"] = V; } get onkeyup() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onkeyup"]); } set onkeyup(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onkeyup"] = V; } get onload() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onload"]); } set onload(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onload"] = V; } get onloadeddata() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onloadeddata"]); } set onloadeddata(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onloadeddata"] = V; } get onloadedmetadata() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onloadedmetadata"]); } set onloadedmetadata(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onloadedmetadata"] = V; } get onloadend() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onloadend"]); } set onloadend(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onloadend"] = V; } get onloadstart() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onloadstart"]); } set onloadstart(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onloadstart"] = V; } get onmousedown() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onmousedown"]); } set onmousedown(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onmousedown"] = V; } get onmouseenter() { return utils.tryWrapperForImpl(this[impl]["onmouseenter"]); } set onmouseenter(V) { V = utils.tryImplForWrapper(V); this[impl]["onmouseenter"] = V; } get onmouseleave() { return utils.tryWrapperForImpl(this[impl]["onmouseleave"]); } set onmouseleave(V) { V = utils.tryImplForWrapper(V); this[impl]["onmouseleave"] = V; } get onmousemove() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onmousemove"]); } set onmousemove(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onmousemove"] = V; } get onmouseout() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onmouseout"]); } set onmouseout(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onmouseout"] = V; } get onmouseover() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onmouseover"]); } set onmouseover(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onmouseover"] = V; } get onmouseup() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onmouseup"]); } set onmouseup(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onmouseup"] = V; } get onwheel() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onwheel"]); } set onwheel(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onwheel"] = V; } get onpause() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onpause"]); } set onpause(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onpause"] = V; } get onplay() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onplay"]); } set onplay(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onplay"] = V; } get onplaying() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onplaying"]); } set onplaying(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onplaying"] = V; } get onprogress() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onprogress"]); } set onprogress(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onprogress"] = V; } get onratechange() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onratechange"]); } set onratechange(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onratechange"] = V; } get onreset() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onreset"]); } set onreset(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onreset"] = V; } get onresize() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onresize"]); } set onresize(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onresize"] = V; } get onscroll() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onscroll"]); } set onscroll(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onscroll"] = V; } get onsecuritypolicyviolation() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onsecuritypolicyviolation"]); } set onsecuritypolicyviolation(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onsecuritypolicyviolation"] = V; } get onseeked() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onseeked"]); } set onseeked(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onseeked"] = V; } get onseeking() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onseeking"]); } set onseeking(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onseeking"] = V; } get onselect() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onselect"]); } set onselect(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onselect"] = V; } get onstalled() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onstalled"]); } set onstalled(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onstalled"] = V; } get onsubmit() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onsubmit"]); } set onsubmit(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onsubmit"] = V; } get onsuspend() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onsuspend"]); } set onsuspend(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onsuspend"] = V; } get ontimeupdate() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["ontimeupdate"]); } set ontimeupdate(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["ontimeupdate"] = V; } get ontoggle() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["ontoggle"]); } set ontoggle(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["ontoggle"] = V; } get onvolumechange() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onvolumechange"]); } set onvolumechange(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onvolumechange"] = V; } get onwaiting() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.tryWrapperForImpl(this[impl]["onwaiting"]); } set onwaiting(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = utils.tryImplForWrapper(V); this[impl]["onwaiting"] = V; } get dataset() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } return utils.getSameObject(this, "dataset", () => { return utils.tryWrapperForImpl(this[impl]["dataset"]); }); } get nonce() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } const value = this[impl].getAttributeNS(null, "nonce"); return value === null ? "" : value; } set nonce(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = conversions["DOMString"](V, { context: "Failed to set the 'nonce' property on 'HTMLElement': The provided value" }); this[impl].setAttributeNS(null, "nonce", V); } get tabIndex() { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } ceReactionsPreSteps_helpers_custom_elements(globalObject); try { return this[impl]["tabIndex"]; } finally { ceReactionsPostSteps_helpers_custom_elements(globalObject); } } set tabIndex(V) { if (!this || !exports.is(this)) { throw new TypeError("Illegal invocation"); } V = conversions["long"](V, { context: "Failed to set the 'tabIndex' property on 'HTMLElement': The provided value" }); ceReactionsPreSteps_helpers_custom_elements(globalObject); try { this[impl]["tabIndex"] = V; } finally { ceReactionsPostSteps_helpers_custom_elements(globalObject); } } } Object.defineProperties(HTMLElement.prototype, { click: { enumerable: true }, focus: { enumerable: true }, blur: { enumerable: true }, title: { enumerable: true }, lang: { enumerable: true }, translate: { enumerable: true }, dir: { enumerable: true }, hidden: { enumerable: true }, accessKey: { enumerable: true }, draggable: { enumerable: true }, offsetParent: { enumerable: true }, offsetTop: { enumerable: true }, offsetLeft: { enumerable: true }, offsetWidth: { enumerable: true }, offsetHeight: { enumerable: true }, style: { enumerable: true }, onabort: { enumerable: true }, onauxclick: { enumerable: true }, onblur: { enumerable: true }, oncancel: { enumerable: true }, oncanplay: { enumerable: true }, oncanplaythrough: { enumerable: true }, onchange: { enumerable: true }, onclick: { enumerable: true }, onclose: { enumerable: true }, oncontextmenu: { enumerable: true }, oncuechange: { enumerable: true }, ondblclick: { enumerable: true }, ondrag: { enumerable: true }, ondragend: { enumerable: true }, ondragenter: { enumerable: true }, ondragexit: { enumerable: true }, ondragleave: { enumerable: true }, ondragover: { enumerable: true }, ondragstart: { enumerable: true }, ondrop: { enumerable: true }, ondurationchange: { enumerable: true }, onemptied: { enumerable: true }, onended: { enumerable: true }, onerror: { enumerable: true }, onfocus: { enumerable: true }, oninput: { enumerable: true }, oninvalid: { enumerable: true }, onkeydown: { enumerable: true }, onkeypress: { enumerable: true }, onkeyup: { enumerable: true }, onload: { enumerable: true }, onloadeddata: { enumerable: true }, onloadedmetadata: { enumerable: true }, onloadend: { enumerable: true }, onloadstart: { enumerable: true }, onmousedown: { enumerable: true }, onmouseenter: { enumerable: true }, onmouseleave: { enumerable: true }, onmousemove: { enumerable: true }, onmouseout: { enumerable: true }, onmouseover: { enumerable: true }, onmouseup: { enumerable: true }, onwheel: { enumerable: true }, onpause: { enumerable: true }, onplay: { enumerable: true }, onplaying: { enumerable: true }, onprogress: { enumerable: true }, onratechange: { enumerable: true }, onreset: { enumerable: true }, onresize: { enumerable: true }, onscroll: { enumerable: true }, onsecuritypolicyviolation: { enumerable: true }, onseeked: { enumerable: true }, onseeking: { enumerable: true }, onselect: { enumerable: true }, onstalled: { enumerable: true }, onsubmit: { enumerable: true }, onsuspend: { enumerable: true }, ontimeupdate: { enumerable: true }, ontoggle: { enumerable: true }, onvolumechange: { enumerable: true }, onwaiting: { enumerable: true }, dataset: { enumerable: true }, nonce: { enumerable: true }, tabIndex: { enumerable: true }, [Symbol.toStringTag]: { value: "HTMLElement", configurable: true } }); if (globalObject[ctorRegistry] === undefined) { globalObject[ctorRegistry] = Object.create(null); } globalObject[ctorRegistry][interfaceName] = HTMLElement; Object.defineProperty(globalObject, interfaceName, { configurable: true, writable: true, value: HTMLElement }); }; const Impl = require("../nodes/HTMLElement-impl.js");