HTMLElement.js 108 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492
  1. "use strict";
  2. const conversions = require("webidl-conversions");
  3. const utils = require("./utils.js");
  4. const HTMLConstructor_jsdom_living_helpers_html_constructor =
  5. require("../../jsdom/living/helpers/html-constructor.js").HTMLConstructor;
  6. const ceReactionsPreSteps_jsdom_living_helpers_custom_elements =
  7. require("../../jsdom/living/helpers/custom-elements.js").ceReactionsPreSteps;
  8. const ceReactionsPostSteps_jsdom_living_helpers_custom_elements =
  9. require("../../jsdom/living/helpers/custom-elements.js").ceReactionsPostSteps;
  10. const EventHandlerNonNull = require("./EventHandlerNonNull.js");
  11. const OnErrorEventHandlerNonNull = require("./OnErrorEventHandlerNonNull.js");
  12. const implSymbol = utils.implSymbol;
  13. const ctorRegistrySymbol = utils.ctorRegistrySymbol;
  14. const Element = require("./Element.js");
  15. const interfaceName = "HTMLElement";
  16. exports.is = value => {
  17. return utils.isObject(value) && Object.hasOwn(value, implSymbol) && value[implSymbol] instanceof Impl.implementation;
  18. };
  19. exports.isImpl = value => {
  20. return utils.isObject(value) && value instanceof Impl.implementation;
  21. };
  22. exports.convert = (globalObject, value, { context = "The provided value" } = {}) => {
  23. if (exports.is(value)) {
  24. return utils.implForWrapper(value);
  25. }
  26. throw new globalObject.TypeError(`${context} is not of type 'HTMLElement'.`);
  27. };
  28. function makeWrapper(globalObject, newTarget) {
  29. let proto;
  30. if (newTarget !== undefined) {
  31. proto = newTarget.prototype;
  32. }
  33. if (!utils.isObject(proto)) {
  34. proto = globalObject[ctorRegistrySymbol]["HTMLElement"].prototype;
  35. }
  36. return Object.create(proto);
  37. }
  38. exports.create = (globalObject, constructorArgs, privateData) => {
  39. const wrapper = makeWrapper(globalObject);
  40. return exports.setup(wrapper, globalObject, constructorArgs, privateData);
  41. };
  42. exports.createImpl = (globalObject, constructorArgs, privateData) => {
  43. const wrapper = exports.create(globalObject, constructorArgs, privateData);
  44. return utils.implForWrapper(wrapper);
  45. };
  46. exports._internalSetup = (wrapper, globalObject) => {
  47. Element._internalSetup(wrapper, globalObject);
  48. };
  49. exports.setup = (wrapper, globalObject, constructorArgs = [], privateData = {}) => {
  50. privateData.wrapper = wrapper;
  51. exports._internalSetup(wrapper, globalObject);
  52. Object.defineProperty(wrapper, implSymbol, {
  53. value: new Impl.implementation(globalObject, constructorArgs, privateData),
  54. configurable: true
  55. });
  56. wrapper[implSymbol][utils.wrapperSymbol] = wrapper;
  57. if (Impl.init) {
  58. Impl.init(wrapper[implSymbol]);
  59. }
  60. return wrapper;
  61. };
  62. exports.new = (globalObject, newTarget) => {
  63. const wrapper = makeWrapper(globalObject, newTarget);
  64. exports._internalSetup(wrapper, globalObject);
  65. Object.defineProperty(wrapper, implSymbol, {
  66. value: Object.create(Impl.implementation.prototype),
  67. configurable: true
  68. });
  69. wrapper[implSymbol][utils.wrapperSymbol] = wrapper;
  70. if (Impl.init) {
  71. Impl.init(wrapper[implSymbol]);
  72. }
  73. return wrapper[implSymbol];
  74. };
  75. const exposed = new Set(["Window"]);
  76. exports.install = (globalObject, globalNames) => {
  77. if (!globalNames.some(globalName => exposed.has(globalName))) {
  78. return;
  79. }
  80. const ctorRegistry = utils.initCtorRegistry(globalObject);
  81. class HTMLElement extends globalObject.Element {
  82. constructor() {
  83. return HTMLConstructor_jsdom_living_helpers_html_constructor(globalObject, interfaceName, new.target);
  84. }
  85. click() {
  86. const esValue = this !== null && this !== undefined ? this : globalObject;
  87. if (!exports.is(esValue)) {
  88. throw new globalObject.TypeError("'click' called on an object that is not a valid instance of HTMLElement.");
  89. }
  90. return esValue[implSymbol].click();
  91. }
  92. attachInternals() {
  93. const esValue = this !== null && this !== undefined ? this : globalObject;
  94. if (!exports.is(esValue)) {
  95. throw new globalObject.TypeError(
  96. "'attachInternals' called on an object that is not a valid instance of HTMLElement."
  97. );
  98. }
  99. return utils.tryWrapperForImpl(esValue[implSymbol].attachInternals());
  100. }
  101. focus() {
  102. const esValue = this !== null && this !== undefined ? this : globalObject;
  103. if (!exports.is(esValue)) {
  104. throw new globalObject.TypeError("'focus' called on an object that is not a valid instance of HTMLElement.");
  105. }
  106. return esValue[implSymbol].focus();
  107. }
  108. blur() {
  109. const esValue = this !== null && this !== undefined ? this : globalObject;
  110. if (!exports.is(esValue)) {
  111. throw new globalObject.TypeError("'blur' called on an object that is not a valid instance of HTMLElement.");
  112. }
  113. return esValue[implSymbol].blur();
  114. }
  115. get title() {
  116. const esValue = this !== null && this !== undefined ? this : globalObject;
  117. if (!exports.is(esValue)) {
  118. throw new globalObject.TypeError(
  119. "'get title' called on an object that is not a valid instance of HTMLElement."
  120. );
  121. }
  122. ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
  123. try {
  124. const value = esValue[implSymbol]._reflectGetTheContentAttribute("title");
  125. return value === null ? "" : value;
  126. } finally {
  127. ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
  128. }
  129. }
  130. set title(V) {
  131. const esValue = this !== null && this !== undefined ? this : globalObject;
  132. if (!exports.is(esValue)) {
  133. throw new globalObject.TypeError(
  134. "'set title' called on an object that is not a valid instance of HTMLElement."
  135. );
  136. }
  137. V = conversions["DOMString"](V, {
  138. context: "Failed to set the 'title' property on 'HTMLElement': The provided value",
  139. globals: globalObject
  140. });
  141. ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
  142. try {
  143. esValue[implSymbol]._reflectSetTheContentAttribute("title", V);
  144. } finally {
  145. ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
  146. }
  147. }
  148. get lang() {
  149. const esValue = this !== null && this !== undefined ? this : globalObject;
  150. if (!exports.is(esValue)) {
  151. throw new globalObject.TypeError("'get lang' called on an object that is not a valid instance of HTMLElement.");
  152. }
  153. ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
  154. try {
  155. const value = esValue[implSymbol]._reflectGetTheContentAttribute("lang");
  156. return value === null ? "" : value;
  157. } finally {
  158. ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
  159. }
  160. }
  161. set lang(V) {
  162. const esValue = this !== null && this !== undefined ? this : globalObject;
  163. if (!exports.is(esValue)) {
  164. throw new globalObject.TypeError("'set lang' called on an object that is not a valid instance of HTMLElement.");
  165. }
  166. V = conversions["DOMString"](V, {
  167. context: "Failed to set the 'lang' property on 'HTMLElement': The provided value",
  168. globals: globalObject
  169. });
  170. ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
  171. try {
  172. esValue[implSymbol]._reflectSetTheContentAttribute("lang", V);
  173. } finally {
  174. ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
  175. }
  176. }
  177. get translate() {
  178. const esValue = this !== null && this !== undefined ? this : globalObject;
  179. if (!exports.is(esValue)) {
  180. throw new globalObject.TypeError(
  181. "'get translate' called on an object that is not a valid instance of HTMLElement."
  182. );
  183. }
  184. ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
  185. try {
  186. return esValue[implSymbol]["translate"];
  187. } finally {
  188. ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
  189. }
  190. }
  191. set translate(V) {
  192. const esValue = this !== null && this !== undefined ? this : globalObject;
  193. if (!exports.is(esValue)) {
  194. throw new globalObject.TypeError(
  195. "'set translate' called on an object that is not a valid instance of HTMLElement."
  196. );
  197. }
  198. V = conversions["boolean"](V, {
  199. context: "Failed to set the 'translate' property on 'HTMLElement': The provided value",
  200. globals: globalObject
  201. });
  202. ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
  203. try {
  204. esValue[implSymbol]["translate"] = V;
  205. } finally {
  206. ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
  207. }
  208. }
  209. get dir() {
  210. const esValue = this !== null && this !== undefined ? this : globalObject;
  211. if (!exports.is(esValue)) {
  212. throw new globalObject.TypeError("'get dir' called on an object that is not a valid instance of HTMLElement.");
  213. }
  214. ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
  215. try {
  216. return esValue[implSymbol]["dir"];
  217. } finally {
  218. ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
  219. }
  220. }
  221. set dir(V) {
  222. const esValue = this !== null && this !== undefined ? this : globalObject;
  223. if (!exports.is(esValue)) {
  224. throw new globalObject.TypeError("'set dir' called on an object that is not a valid instance of HTMLElement.");
  225. }
  226. V = conversions["DOMString"](V, {
  227. context: "Failed to set the 'dir' property on 'HTMLElement': The provided value",
  228. globals: globalObject
  229. });
  230. ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
  231. try {
  232. esValue[implSymbol]["dir"] = V;
  233. } finally {
  234. ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
  235. }
  236. }
  237. get hidden() {
  238. const esValue = this !== null && this !== undefined ? this : globalObject;
  239. if (!exports.is(esValue)) {
  240. throw new globalObject.TypeError(
  241. "'get hidden' called on an object that is not a valid instance of HTMLElement."
  242. );
  243. }
  244. ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
  245. try {
  246. return esValue[implSymbol]._reflectGetTheContentAttribute("hidden") !== null;
  247. } finally {
  248. ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
  249. }
  250. }
  251. set hidden(V) {
  252. const esValue = this !== null && this !== undefined ? this : globalObject;
  253. if (!exports.is(esValue)) {
  254. throw new globalObject.TypeError(
  255. "'set hidden' called on an object that is not a valid instance of HTMLElement."
  256. );
  257. }
  258. V = conversions["boolean"](V, {
  259. context: "Failed to set the 'hidden' property on 'HTMLElement': The provided value",
  260. globals: globalObject
  261. });
  262. ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
  263. try {
  264. if (V) {
  265. esValue[implSymbol]._reflectSetTheContentAttribute("hidden", "");
  266. } else {
  267. esValue[implSymbol]._reflectDeleteTheContentAttribute("hidden");
  268. }
  269. } finally {
  270. ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
  271. }
  272. }
  273. get accessKey() {
  274. const esValue = this !== null && this !== undefined ? this : globalObject;
  275. if (!exports.is(esValue)) {
  276. throw new globalObject.TypeError(
  277. "'get accessKey' called on an object that is not a valid instance of HTMLElement."
  278. );
  279. }
  280. ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
  281. try {
  282. const value = esValue[implSymbol]._reflectGetTheContentAttribute("accesskey");
  283. return value === null ? "" : value;
  284. } finally {
  285. ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
  286. }
  287. }
  288. set accessKey(V) {
  289. const esValue = this !== null && this !== undefined ? this : globalObject;
  290. if (!exports.is(esValue)) {
  291. throw new globalObject.TypeError(
  292. "'set accessKey' called on an object that is not a valid instance of HTMLElement."
  293. );
  294. }
  295. V = conversions["DOMString"](V, {
  296. context: "Failed to set the 'accessKey' property on 'HTMLElement': The provided value",
  297. globals: globalObject
  298. });
  299. ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
  300. try {
  301. esValue[implSymbol]._reflectSetTheContentAttribute("accesskey", V);
  302. } finally {
  303. ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
  304. }
  305. }
  306. get draggable() {
  307. const esValue = this !== null && this !== undefined ? this : globalObject;
  308. if (!exports.is(esValue)) {
  309. throw new globalObject.TypeError(
  310. "'get draggable' called on an object that is not a valid instance of HTMLElement."
  311. );
  312. }
  313. ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
  314. try {
  315. return esValue[implSymbol]["draggable"];
  316. } finally {
  317. ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
  318. }
  319. }
  320. set draggable(V) {
  321. const esValue = this !== null && this !== undefined ? this : globalObject;
  322. if (!exports.is(esValue)) {
  323. throw new globalObject.TypeError(
  324. "'set draggable' called on an object that is not a valid instance of HTMLElement."
  325. );
  326. }
  327. V = conversions["boolean"](V, {
  328. context: "Failed to set the 'draggable' property on 'HTMLElement': The provided value",
  329. globals: globalObject
  330. });
  331. ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
  332. try {
  333. esValue[implSymbol]["draggable"] = V;
  334. } finally {
  335. ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
  336. }
  337. }
  338. get offsetParent() {
  339. const esValue = this !== null && this !== undefined ? this : globalObject;
  340. if (!exports.is(esValue)) {
  341. throw new globalObject.TypeError(
  342. "'get offsetParent' called on an object that is not a valid instance of HTMLElement."
  343. );
  344. }
  345. return utils.tryWrapperForImpl(esValue[implSymbol]["offsetParent"]);
  346. }
  347. get offsetTop() {
  348. const esValue = this !== null && this !== undefined ? this : globalObject;
  349. if (!exports.is(esValue)) {
  350. throw new globalObject.TypeError(
  351. "'get offsetTop' called on an object that is not a valid instance of HTMLElement."
  352. );
  353. }
  354. return esValue[implSymbol]["offsetTop"];
  355. }
  356. get offsetLeft() {
  357. const esValue = this !== null && this !== undefined ? this : globalObject;
  358. if (!exports.is(esValue)) {
  359. throw new globalObject.TypeError(
  360. "'get offsetLeft' called on an object that is not a valid instance of HTMLElement."
  361. );
  362. }
  363. return esValue[implSymbol]["offsetLeft"];
  364. }
  365. get offsetWidth() {
  366. const esValue = this !== null && this !== undefined ? this : globalObject;
  367. if (!exports.is(esValue)) {
  368. throw new globalObject.TypeError(
  369. "'get offsetWidth' called on an object that is not a valid instance of HTMLElement."
  370. );
  371. }
  372. return esValue[implSymbol]["offsetWidth"];
  373. }
  374. get offsetHeight() {
  375. const esValue = this !== null && this !== undefined ? this : globalObject;
  376. if (!exports.is(esValue)) {
  377. throw new globalObject.TypeError(
  378. "'get offsetHeight' called on an object that is not a valid instance of HTMLElement."
  379. );
  380. }
  381. return esValue[implSymbol]["offsetHeight"];
  382. }
  383. get style() {
  384. const esValue = this !== null && this !== undefined ? this : globalObject;
  385. if (!exports.is(esValue)) {
  386. throw new globalObject.TypeError(
  387. "'get style' called on an object that is not a valid instance of HTMLElement."
  388. );
  389. }
  390. return utils.getSameObject(this, "style", () => {
  391. return utils.tryWrapperForImpl(esValue[implSymbol]["style"]);
  392. });
  393. }
  394. set style(V) {
  395. const esValue = this !== null && this !== undefined ? this : globalObject;
  396. if (!exports.is(esValue)) {
  397. throw new globalObject.TypeError(
  398. "'set style' called on an object that is not a valid instance of HTMLElement."
  399. );
  400. }
  401. const Q = esValue["style"];
  402. if (!utils.isObject(Q)) {
  403. throw new globalObject.TypeError("Property 'style' is not an object");
  404. }
  405. Reflect.set(Q, "cssText", V);
  406. }
  407. get onabort() {
  408. const esValue = this !== null && this !== undefined ? this : globalObject;
  409. if (!exports.is(esValue)) {
  410. throw new globalObject.TypeError(
  411. "'get onabort' called on an object that is not a valid instance of HTMLElement."
  412. );
  413. }
  414. return utils.tryWrapperForImpl(esValue[implSymbol]["onabort"]);
  415. }
  416. set onabort(V) {
  417. const esValue = this !== null && this !== undefined ? this : globalObject;
  418. if (!exports.is(esValue)) {
  419. throw new globalObject.TypeError(
  420. "'set onabort' called on an object that is not a valid instance of HTMLElement."
  421. );
  422. }
  423. if (!utils.isObject(V)) {
  424. V = null;
  425. } else {
  426. V = EventHandlerNonNull.convert(globalObject, V, {
  427. context: "Failed to set the 'onabort' property on 'HTMLElement': The provided value"
  428. });
  429. }
  430. esValue[implSymbol]["onabort"] = V;
  431. }
  432. get onauxclick() {
  433. const esValue = this !== null && this !== undefined ? this : globalObject;
  434. if (!exports.is(esValue)) {
  435. throw new globalObject.TypeError(
  436. "'get onauxclick' called on an object that is not a valid instance of HTMLElement."
  437. );
  438. }
  439. return utils.tryWrapperForImpl(esValue[implSymbol]["onauxclick"]);
  440. }
  441. set onauxclick(V) {
  442. const esValue = this !== null && this !== undefined ? this : globalObject;
  443. if (!exports.is(esValue)) {
  444. throw new globalObject.TypeError(
  445. "'set onauxclick' called on an object that is not a valid instance of HTMLElement."
  446. );
  447. }
  448. if (!utils.isObject(V)) {
  449. V = null;
  450. } else {
  451. V = EventHandlerNonNull.convert(globalObject, V, {
  452. context: "Failed to set the 'onauxclick' property on 'HTMLElement': The provided value"
  453. });
  454. }
  455. esValue[implSymbol]["onauxclick"] = V;
  456. }
  457. get onbeforeinput() {
  458. const esValue = this !== null && this !== undefined ? this : globalObject;
  459. if (!exports.is(esValue)) {
  460. throw new globalObject.TypeError(
  461. "'get onbeforeinput' called on an object that is not a valid instance of HTMLElement."
  462. );
  463. }
  464. return utils.tryWrapperForImpl(esValue[implSymbol]["onbeforeinput"]);
  465. }
  466. set onbeforeinput(V) {
  467. const esValue = this !== null && this !== undefined ? this : globalObject;
  468. if (!exports.is(esValue)) {
  469. throw new globalObject.TypeError(
  470. "'set onbeforeinput' called on an object that is not a valid instance of HTMLElement."
  471. );
  472. }
  473. if (!utils.isObject(V)) {
  474. V = null;
  475. } else {
  476. V = EventHandlerNonNull.convert(globalObject, V, {
  477. context: "Failed to set the 'onbeforeinput' property on 'HTMLElement': The provided value"
  478. });
  479. }
  480. esValue[implSymbol]["onbeforeinput"] = V;
  481. }
  482. get onbeforematch() {
  483. const esValue = this !== null && this !== undefined ? this : globalObject;
  484. if (!exports.is(esValue)) {
  485. throw new globalObject.TypeError(
  486. "'get onbeforematch' called on an object that is not a valid instance of HTMLElement."
  487. );
  488. }
  489. return utils.tryWrapperForImpl(esValue[implSymbol]["onbeforematch"]);
  490. }
  491. set onbeforematch(V) {
  492. const esValue = this !== null && this !== undefined ? this : globalObject;
  493. if (!exports.is(esValue)) {
  494. throw new globalObject.TypeError(
  495. "'set onbeforematch' called on an object that is not a valid instance of HTMLElement."
  496. );
  497. }
  498. if (!utils.isObject(V)) {
  499. V = null;
  500. } else {
  501. V = EventHandlerNonNull.convert(globalObject, V, {
  502. context: "Failed to set the 'onbeforematch' property on 'HTMLElement': The provided value"
  503. });
  504. }
  505. esValue[implSymbol]["onbeforematch"] = V;
  506. }
  507. get onbeforetoggle() {
  508. const esValue = this !== null && this !== undefined ? this : globalObject;
  509. if (!exports.is(esValue)) {
  510. throw new globalObject.TypeError(
  511. "'get onbeforetoggle' called on an object that is not a valid instance of HTMLElement."
  512. );
  513. }
  514. return utils.tryWrapperForImpl(esValue[implSymbol]["onbeforetoggle"]);
  515. }
  516. set onbeforetoggle(V) {
  517. const esValue = this !== null && this !== undefined ? this : globalObject;
  518. if (!exports.is(esValue)) {
  519. throw new globalObject.TypeError(
  520. "'set onbeforetoggle' called on an object that is not a valid instance of HTMLElement."
  521. );
  522. }
  523. if (!utils.isObject(V)) {
  524. V = null;
  525. } else {
  526. V = EventHandlerNonNull.convert(globalObject, V, {
  527. context: "Failed to set the 'onbeforetoggle' property on 'HTMLElement': The provided value"
  528. });
  529. }
  530. esValue[implSymbol]["onbeforetoggle"] = V;
  531. }
  532. get onblur() {
  533. const esValue = this !== null && this !== undefined ? this : globalObject;
  534. if (!exports.is(esValue)) {
  535. throw new globalObject.TypeError(
  536. "'get onblur' called on an object that is not a valid instance of HTMLElement."
  537. );
  538. }
  539. return utils.tryWrapperForImpl(esValue[implSymbol]["onblur"]);
  540. }
  541. set onblur(V) {
  542. const esValue = this !== null && this !== undefined ? this : globalObject;
  543. if (!exports.is(esValue)) {
  544. throw new globalObject.TypeError(
  545. "'set onblur' called on an object that is not a valid instance of HTMLElement."
  546. );
  547. }
  548. if (!utils.isObject(V)) {
  549. V = null;
  550. } else {
  551. V = EventHandlerNonNull.convert(globalObject, V, {
  552. context: "Failed to set the 'onblur' property on 'HTMLElement': The provided value"
  553. });
  554. }
  555. esValue[implSymbol]["onblur"] = V;
  556. }
  557. get oncancel() {
  558. const esValue = this !== null && this !== undefined ? this : globalObject;
  559. if (!exports.is(esValue)) {
  560. throw new globalObject.TypeError(
  561. "'get oncancel' called on an object that is not a valid instance of HTMLElement."
  562. );
  563. }
  564. return utils.tryWrapperForImpl(esValue[implSymbol]["oncancel"]);
  565. }
  566. set oncancel(V) {
  567. const esValue = this !== null && this !== undefined ? this : globalObject;
  568. if (!exports.is(esValue)) {
  569. throw new globalObject.TypeError(
  570. "'set oncancel' called on an object that is not a valid instance of HTMLElement."
  571. );
  572. }
  573. if (!utils.isObject(V)) {
  574. V = null;
  575. } else {
  576. V = EventHandlerNonNull.convert(globalObject, V, {
  577. context: "Failed to set the 'oncancel' property on 'HTMLElement': The provided value"
  578. });
  579. }
  580. esValue[implSymbol]["oncancel"] = V;
  581. }
  582. get oncanplay() {
  583. const esValue = this !== null && this !== undefined ? this : globalObject;
  584. if (!exports.is(esValue)) {
  585. throw new globalObject.TypeError(
  586. "'get oncanplay' called on an object that is not a valid instance of HTMLElement."
  587. );
  588. }
  589. return utils.tryWrapperForImpl(esValue[implSymbol]["oncanplay"]);
  590. }
  591. set oncanplay(V) {
  592. const esValue = this !== null && this !== undefined ? this : globalObject;
  593. if (!exports.is(esValue)) {
  594. throw new globalObject.TypeError(
  595. "'set oncanplay' called on an object that is not a valid instance of HTMLElement."
  596. );
  597. }
  598. if (!utils.isObject(V)) {
  599. V = null;
  600. } else {
  601. V = EventHandlerNonNull.convert(globalObject, V, {
  602. context: "Failed to set the 'oncanplay' property on 'HTMLElement': The provided value"
  603. });
  604. }
  605. esValue[implSymbol]["oncanplay"] = V;
  606. }
  607. get oncanplaythrough() {
  608. const esValue = this !== null && this !== undefined ? this : globalObject;
  609. if (!exports.is(esValue)) {
  610. throw new globalObject.TypeError(
  611. "'get oncanplaythrough' called on an object that is not a valid instance of HTMLElement."
  612. );
  613. }
  614. return utils.tryWrapperForImpl(esValue[implSymbol]["oncanplaythrough"]);
  615. }
  616. set oncanplaythrough(V) {
  617. const esValue = this !== null && this !== undefined ? this : globalObject;
  618. if (!exports.is(esValue)) {
  619. throw new globalObject.TypeError(
  620. "'set oncanplaythrough' called on an object that is not a valid instance of HTMLElement."
  621. );
  622. }
  623. if (!utils.isObject(V)) {
  624. V = null;
  625. } else {
  626. V = EventHandlerNonNull.convert(globalObject, V, {
  627. context: "Failed to set the 'oncanplaythrough' property on 'HTMLElement': The provided value"
  628. });
  629. }
  630. esValue[implSymbol]["oncanplaythrough"] = V;
  631. }
  632. get onchange() {
  633. const esValue = this !== null && this !== undefined ? this : globalObject;
  634. if (!exports.is(esValue)) {
  635. throw new globalObject.TypeError(
  636. "'get onchange' called on an object that is not a valid instance of HTMLElement."
  637. );
  638. }
  639. return utils.tryWrapperForImpl(esValue[implSymbol]["onchange"]);
  640. }
  641. set onchange(V) {
  642. const esValue = this !== null && this !== undefined ? this : globalObject;
  643. if (!exports.is(esValue)) {
  644. throw new globalObject.TypeError(
  645. "'set onchange' called on an object that is not a valid instance of HTMLElement."
  646. );
  647. }
  648. if (!utils.isObject(V)) {
  649. V = null;
  650. } else {
  651. V = EventHandlerNonNull.convert(globalObject, V, {
  652. context: "Failed to set the 'onchange' property on 'HTMLElement': The provided value"
  653. });
  654. }
  655. esValue[implSymbol]["onchange"] = V;
  656. }
  657. get onclick() {
  658. const esValue = this !== null && this !== undefined ? this : globalObject;
  659. if (!exports.is(esValue)) {
  660. throw new globalObject.TypeError(
  661. "'get onclick' called on an object that is not a valid instance of HTMLElement."
  662. );
  663. }
  664. return utils.tryWrapperForImpl(esValue[implSymbol]["onclick"]);
  665. }
  666. set onclick(V) {
  667. const esValue = this !== null && this !== undefined ? this : globalObject;
  668. if (!exports.is(esValue)) {
  669. throw new globalObject.TypeError(
  670. "'set onclick' called on an object that is not a valid instance of HTMLElement."
  671. );
  672. }
  673. if (!utils.isObject(V)) {
  674. V = null;
  675. } else {
  676. V = EventHandlerNonNull.convert(globalObject, V, {
  677. context: "Failed to set the 'onclick' property on 'HTMLElement': The provided value"
  678. });
  679. }
  680. esValue[implSymbol]["onclick"] = V;
  681. }
  682. get onclose() {
  683. const esValue = this !== null && this !== undefined ? this : globalObject;
  684. if (!exports.is(esValue)) {
  685. throw new globalObject.TypeError(
  686. "'get onclose' called on an object that is not a valid instance of HTMLElement."
  687. );
  688. }
  689. return utils.tryWrapperForImpl(esValue[implSymbol]["onclose"]);
  690. }
  691. set onclose(V) {
  692. const esValue = this !== null && this !== undefined ? this : globalObject;
  693. if (!exports.is(esValue)) {
  694. throw new globalObject.TypeError(
  695. "'set onclose' called on an object that is not a valid instance of HTMLElement."
  696. );
  697. }
  698. if (!utils.isObject(V)) {
  699. V = null;
  700. } else {
  701. V = EventHandlerNonNull.convert(globalObject, V, {
  702. context: "Failed to set the 'onclose' property on 'HTMLElement': The provided value"
  703. });
  704. }
  705. esValue[implSymbol]["onclose"] = V;
  706. }
  707. get oncontextlost() {
  708. const esValue = this !== null && this !== undefined ? this : globalObject;
  709. if (!exports.is(esValue)) {
  710. throw new globalObject.TypeError(
  711. "'get oncontextlost' called on an object that is not a valid instance of HTMLElement."
  712. );
  713. }
  714. return utils.tryWrapperForImpl(esValue[implSymbol]["oncontextlost"]);
  715. }
  716. set oncontextlost(V) {
  717. const esValue = this !== null && this !== undefined ? this : globalObject;
  718. if (!exports.is(esValue)) {
  719. throw new globalObject.TypeError(
  720. "'set oncontextlost' called on an object that is not a valid instance of HTMLElement."
  721. );
  722. }
  723. if (!utils.isObject(V)) {
  724. V = null;
  725. } else {
  726. V = EventHandlerNonNull.convert(globalObject, V, {
  727. context: "Failed to set the 'oncontextlost' property on 'HTMLElement': The provided value"
  728. });
  729. }
  730. esValue[implSymbol]["oncontextlost"] = V;
  731. }
  732. get oncontextmenu() {
  733. const esValue = this !== null && this !== undefined ? this : globalObject;
  734. if (!exports.is(esValue)) {
  735. throw new globalObject.TypeError(
  736. "'get oncontextmenu' called on an object that is not a valid instance of HTMLElement."
  737. );
  738. }
  739. return utils.tryWrapperForImpl(esValue[implSymbol]["oncontextmenu"]);
  740. }
  741. set oncontextmenu(V) {
  742. const esValue = this !== null && this !== undefined ? this : globalObject;
  743. if (!exports.is(esValue)) {
  744. throw new globalObject.TypeError(
  745. "'set oncontextmenu' called on an object that is not a valid instance of HTMLElement."
  746. );
  747. }
  748. if (!utils.isObject(V)) {
  749. V = null;
  750. } else {
  751. V = EventHandlerNonNull.convert(globalObject, V, {
  752. context: "Failed to set the 'oncontextmenu' property on 'HTMLElement': The provided value"
  753. });
  754. }
  755. esValue[implSymbol]["oncontextmenu"] = V;
  756. }
  757. get oncontextrestored() {
  758. const esValue = this !== null && this !== undefined ? this : globalObject;
  759. if (!exports.is(esValue)) {
  760. throw new globalObject.TypeError(
  761. "'get oncontextrestored' called on an object that is not a valid instance of HTMLElement."
  762. );
  763. }
  764. return utils.tryWrapperForImpl(esValue[implSymbol]["oncontextrestored"]);
  765. }
  766. set oncontextrestored(V) {
  767. const esValue = this !== null && this !== undefined ? this : globalObject;
  768. if (!exports.is(esValue)) {
  769. throw new globalObject.TypeError(
  770. "'set oncontextrestored' called on an object that is not a valid instance of HTMLElement."
  771. );
  772. }
  773. if (!utils.isObject(V)) {
  774. V = null;
  775. } else {
  776. V = EventHandlerNonNull.convert(globalObject, V, {
  777. context: "Failed to set the 'oncontextrestored' property on 'HTMLElement': The provided value"
  778. });
  779. }
  780. esValue[implSymbol]["oncontextrestored"] = V;
  781. }
  782. get oncopy() {
  783. const esValue = this !== null && this !== undefined ? this : globalObject;
  784. if (!exports.is(esValue)) {
  785. throw new globalObject.TypeError(
  786. "'get oncopy' called on an object that is not a valid instance of HTMLElement."
  787. );
  788. }
  789. return utils.tryWrapperForImpl(esValue[implSymbol]["oncopy"]);
  790. }
  791. set oncopy(V) {
  792. const esValue = this !== null && this !== undefined ? this : globalObject;
  793. if (!exports.is(esValue)) {
  794. throw new globalObject.TypeError(
  795. "'set oncopy' called on an object that is not a valid instance of HTMLElement."
  796. );
  797. }
  798. if (!utils.isObject(V)) {
  799. V = null;
  800. } else {
  801. V = EventHandlerNonNull.convert(globalObject, V, {
  802. context: "Failed to set the 'oncopy' property on 'HTMLElement': The provided value"
  803. });
  804. }
  805. esValue[implSymbol]["oncopy"] = V;
  806. }
  807. get oncuechange() {
  808. const esValue = this !== null && this !== undefined ? this : globalObject;
  809. if (!exports.is(esValue)) {
  810. throw new globalObject.TypeError(
  811. "'get oncuechange' called on an object that is not a valid instance of HTMLElement."
  812. );
  813. }
  814. return utils.tryWrapperForImpl(esValue[implSymbol]["oncuechange"]);
  815. }
  816. set oncuechange(V) {
  817. const esValue = this !== null && this !== undefined ? this : globalObject;
  818. if (!exports.is(esValue)) {
  819. throw new globalObject.TypeError(
  820. "'set oncuechange' called on an object that is not a valid instance of HTMLElement."
  821. );
  822. }
  823. if (!utils.isObject(V)) {
  824. V = null;
  825. } else {
  826. V = EventHandlerNonNull.convert(globalObject, V, {
  827. context: "Failed to set the 'oncuechange' property on 'HTMLElement': The provided value"
  828. });
  829. }
  830. esValue[implSymbol]["oncuechange"] = V;
  831. }
  832. get oncut() {
  833. const esValue = this !== null && this !== undefined ? this : globalObject;
  834. if (!exports.is(esValue)) {
  835. throw new globalObject.TypeError(
  836. "'get oncut' called on an object that is not a valid instance of HTMLElement."
  837. );
  838. }
  839. return utils.tryWrapperForImpl(esValue[implSymbol]["oncut"]);
  840. }
  841. set oncut(V) {
  842. const esValue = this !== null && this !== undefined ? this : globalObject;
  843. if (!exports.is(esValue)) {
  844. throw new globalObject.TypeError(
  845. "'set oncut' called on an object that is not a valid instance of HTMLElement."
  846. );
  847. }
  848. if (!utils.isObject(V)) {
  849. V = null;
  850. } else {
  851. V = EventHandlerNonNull.convert(globalObject, V, {
  852. context: "Failed to set the 'oncut' property on 'HTMLElement': The provided value"
  853. });
  854. }
  855. esValue[implSymbol]["oncut"] = V;
  856. }
  857. get ondblclick() {
  858. const esValue = this !== null && this !== undefined ? this : globalObject;
  859. if (!exports.is(esValue)) {
  860. throw new globalObject.TypeError(
  861. "'get ondblclick' called on an object that is not a valid instance of HTMLElement."
  862. );
  863. }
  864. return utils.tryWrapperForImpl(esValue[implSymbol]["ondblclick"]);
  865. }
  866. set ondblclick(V) {
  867. const esValue = this !== null && this !== undefined ? this : globalObject;
  868. if (!exports.is(esValue)) {
  869. throw new globalObject.TypeError(
  870. "'set ondblclick' called on an object that is not a valid instance of HTMLElement."
  871. );
  872. }
  873. if (!utils.isObject(V)) {
  874. V = null;
  875. } else {
  876. V = EventHandlerNonNull.convert(globalObject, V, {
  877. context: "Failed to set the 'ondblclick' property on 'HTMLElement': The provided value"
  878. });
  879. }
  880. esValue[implSymbol]["ondblclick"] = V;
  881. }
  882. get ondrag() {
  883. const esValue = this !== null && this !== undefined ? this : globalObject;
  884. if (!exports.is(esValue)) {
  885. throw new globalObject.TypeError(
  886. "'get ondrag' called on an object that is not a valid instance of HTMLElement."
  887. );
  888. }
  889. return utils.tryWrapperForImpl(esValue[implSymbol]["ondrag"]);
  890. }
  891. set ondrag(V) {
  892. const esValue = this !== null && this !== undefined ? this : globalObject;
  893. if (!exports.is(esValue)) {
  894. throw new globalObject.TypeError(
  895. "'set ondrag' called on an object that is not a valid instance of HTMLElement."
  896. );
  897. }
  898. if (!utils.isObject(V)) {
  899. V = null;
  900. } else {
  901. V = EventHandlerNonNull.convert(globalObject, V, {
  902. context: "Failed to set the 'ondrag' property on 'HTMLElement': The provided value"
  903. });
  904. }
  905. esValue[implSymbol]["ondrag"] = V;
  906. }
  907. get ondragend() {
  908. const esValue = this !== null && this !== undefined ? this : globalObject;
  909. if (!exports.is(esValue)) {
  910. throw new globalObject.TypeError(
  911. "'get ondragend' called on an object that is not a valid instance of HTMLElement."
  912. );
  913. }
  914. return utils.tryWrapperForImpl(esValue[implSymbol]["ondragend"]);
  915. }
  916. set ondragend(V) {
  917. const esValue = this !== null && this !== undefined ? this : globalObject;
  918. if (!exports.is(esValue)) {
  919. throw new globalObject.TypeError(
  920. "'set ondragend' called on an object that is not a valid instance of HTMLElement."
  921. );
  922. }
  923. if (!utils.isObject(V)) {
  924. V = null;
  925. } else {
  926. V = EventHandlerNonNull.convert(globalObject, V, {
  927. context: "Failed to set the 'ondragend' property on 'HTMLElement': The provided value"
  928. });
  929. }
  930. esValue[implSymbol]["ondragend"] = V;
  931. }
  932. get ondragenter() {
  933. const esValue = this !== null && this !== undefined ? this : globalObject;
  934. if (!exports.is(esValue)) {
  935. throw new globalObject.TypeError(
  936. "'get ondragenter' called on an object that is not a valid instance of HTMLElement."
  937. );
  938. }
  939. return utils.tryWrapperForImpl(esValue[implSymbol]["ondragenter"]);
  940. }
  941. set ondragenter(V) {
  942. const esValue = this !== null && this !== undefined ? this : globalObject;
  943. if (!exports.is(esValue)) {
  944. throw new globalObject.TypeError(
  945. "'set ondragenter' called on an object that is not a valid instance of HTMLElement."
  946. );
  947. }
  948. if (!utils.isObject(V)) {
  949. V = null;
  950. } else {
  951. V = EventHandlerNonNull.convert(globalObject, V, {
  952. context: "Failed to set the 'ondragenter' property on 'HTMLElement': The provided value"
  953. });
  954. }
  955. esValue[implSymbol]["ondragenter"] = V;
  956. }
  957. get ondragleave() {
  958. const esValue = this !== null && this !== undefined ? this : globalObject;
  959. if (!exports.is(esValue)) {
  960. throw new globalObject.TypeError(
  961. "'get ondragleave' called on an object that is not a valid instance of HTMLElement."
  962. );
  963. }
  964. return utils.tryWrapperForImpl(esValue[implSymbol]["ondragleave"]);
  965. }
  966. set ondragleave(V) {
  967. const esValue = this !== null && this !== undefined ? this : globalObject;
  968. if (!exports.is(esValue)) {
  969. throw new globalObject.TypeError(
  970. "'set ondragleave' called on an object that is not a valid instance of HTMLElement."
  971. );
  972. }
  973. if (!utils.isObject(V)) {
  974. V = null;
  975. } else {
  976. V = EventHandlerNonNull.convert(globalObject, V, {
  977. context: "Failed to set the 'ondragleave' property on 'HTMLElement': The provided value"
  978. });
  979. }
  980. esValue[implSymbol]["ondragleave"] = V;
  981. }
  982. get ondragover() {
  983. const esValue = this !== null && this !== undefined ? this : globalObject;
  984. if (!exports.is(esValue)) {
  985. throw new globalObject.TypeError(
  986. "'get ondragover' called on an object that is not a valid instance of HTMLElement."
  987. );
  988. }
  989. return utils.tryWrapperForImpl(esValue[implSymbol]["ondragover"]);
  990. }
  991. set ondragover(V) {
  992. const esValue = this !== null && this !== undefined ? this : globalObject;
  993. if (!exports.is(esValue)) {
  994. throw new globalObject.TypeError(
  995. "'set ondragover' called on an object that is not a valid instance of HTMLElement."
  996. );
  997. }
  998. if (!utils.isObject(V)) {
  999. V = null;
  1000. } else {
  1001. V = EventHandlerNonNull.convert(globalObject, V, {
  1002. context: "Failed to set the 'ondragover' property on 'HTMLElement': The provided value"
  1003. });
  1004. }
  1005. esValue[implSymbol]["ondragover"] = V;
  1006. }
  1007. get ondragstart() {
  1008. const esValue = this !== null && this !== undefined ? this : globalObject;
  1009. if (!exports.is(esValue)) {
  1010. throw new globalObject.TypeError(
  1011. "'get ondragstart' called on an object that is not a valid instance of HTMLElement."
  1012. );
  1013. }
  1014. return utils.tryWrapperForImpl(esValue[implSymbol]["ondragstart"]);
  1015. }
  1016. set ondragstart(V) {
  1017. const esValue = this !== null && this !== undefined ? this : globalObject;
  1018. if (!exports.is(esValue)) {
  1019. throw new globalObject.TypeError(
  1020. "'set ondragstart' called on an object that is not a valid instance of HTMLElement."
  1021. );
  1022. }
  1023. if (!utils.isObject(V)) {
  1024. V = null;
  1025. } else {
  1026. V = EventHandlerNonNull.convert(globalObject, V, {
  1027. context: "Failed to set the 'ondragstart' property on 'HTMLElement': The provided value"
  1028. });
  1029. }
  1030. esValue[implSymbol]["ondragstart"] = V;
  1031. }
  1032. get ondrop() {
  1033. const esValue = this !== null && this !== undefined ? this : globalObject;
  1034. if (!exports.is(esValue)) {
  1035. throw new globalObject.TypeError(
  1036. "'get ondrop' called on an object that is not a valid instance of HTMLElement."
  1037. );
  1038. }
  1039. return utils.tryWrapperForImpl(esValue[implSymbol]["ondrop"]);
  1040. }
  1041. set ondrop(V) {
  1042. const esValue = this !== null && this !== undefined ? this : globalObject;
  1043. if (!exports.is(esValue)) {
  1044. throw new globalObject.TypeError(
  1045. "'set ondrop' called on an object that is not a valid instance of HTMLElement."
  1046. );
  1047. }
  1048. if (!utils.isObject(V)) {
  1049. V = null;
  1050. } else {
  1051. V = EventHandlerNonNull.convert(globalObject, V, {
  1052. context: "Failed to set the 'ondrop' property on 'HTMLElement': The provided value"
  1053. });
  1054. }
  1055. esValue[implSymbol]["ondrop"] = V;
  1056. }
  1057. get ondurationchange() {
  1058. const esValue = this !== null && this !== undefined ? this : globalObject;
  1059. if (!exports.is(esValue)) {
  1060. throw new globalObject.TypeError(
  1061. "'get ondurationchange' called on an object that is not a valid instance of HTMLElement."
  1062. );
  1063. }
  1064. return utils.tryWrapperForImpl(esValue[implSymbol]["ondurationchange"]);
  1065. }
  1066. set ondurationchange(V) {
  1067. const esValue = this !== null && this !== undefined ? this : globalObject;
  1068. if (!exports.is(esValue)) {
  1069. throw new globalObject.TypeError(
  1070. "'set ondurationchange' called on an object that is not a valid instance of HTMLElement."
  1071. );
  1072. }
  1073. if (!utils.isObject(V)) {
  1074. V = null;
  1075. } else {
  1076. V = EventHandlerNonNull.convert(globalObject, V, {
  1077. context: "Failed to set the 'ondurationchange' property on 'HTMLElement': The provided value"
  1078. });
  1079. }
  1080. esValue[implSymbol]["ondurationchange"] = V;
  1081. }
  1082. get onemptied() {
  1083. const esValue = this !== null && this !== undefined ? this : globalObject;
  1084. if (!exports.is(esValue)) {
  1085. throw new globalObject.TypeError(
  1086. "'get onemptied' called on an object that is not a valid instance of HTMLElement."
  1087. );
  1088. }
  1089. return utils.tryWrapperForImpl(esValue[implSymbol]["onemptied"]);
  1090. }
  1091. set onemptied(V) {
  1092. const esValue = this !== null && this !== undefined ? this : globalObject;
  1093. if (!exports.is(esValue)) {
  1094. throw new globalObject.TypeError(
  1095. "'set onemptied' called on an object that is not a valid instance of HTMLElement."
  1096. );
  1097. }
  1098. if (!utils.isObject(V)) {
  1099. V = null;
  1100. } else {
  1101. V = EventHandlerNonNull.convert(globalObject, V, {
  1102. context: "Failed to set the 'onemptied' property on 'HTMLElement': The provided value"
  1103. });
  1104. }
  1105. esValue[implSymbol]["onemptied"] = V;
  1106. }
  1107. get onended() {
  1108. const esValue = this !== null && this !== undefined ? this : globalObject;
  1109. if (!exports.is(esValue)) {
  1110. throw new globalObject.TypeError(
  1111. "'get onended' called on an object that is not a valid instance of HTMLElement."
  1112. );
  1113. }
  1114. return utils.tryWrapperForImpl(esValue[implSymbol]["onended"]);
  1115. }
  1116. set onended(V) {
  1117. const esValue = this !== null && this !== undefined ? this : globalObject;
  1118. if (!exports.is(esValue)) {
  1119. throw new globalObject.TypeError(
  1120. "'set onended' called on an object that is not a valid instance of HTMLElement."
  1121. );
  1122. }
  1123. if (!utils.isObject(V)) {
  1124. V = null;
  1125. } else {
  1126. V = EventHandlerNonNull.convert(globalObject, V, {
  1127. context: "Failed to set the 'onended' property on 'HTMLElement': The provided value"
  1128. });
  1129. }
  1130. esValue[implSymbol]["onended"] = V;
  1131. }
  1132. get onerror() {
  1133. const esValue = this !== null && this !== undefined ? this : globalObject;
  1134. if (!exports.is(esValue)) {
  1135. throw new globalObject.TypeError(
  1136. "'get onerror' called on an object that is not a valid instance of HTMLElement."
  1137. );
  1138. }
  1139. return utils.tryWrapperForImpl(esValue[implSymbol]["onerror"]);
  1140. }
  1141. set onerror(V) {
  1142. const esValue = this !== null && this !== undefined ? this : globalObject;
  1143. if (!exports.is(esValue)) {
  1144. throw new globalObject.TypeError(
  1145. "'set onerror' called on an object that is not a valid instance of HTMLElement."
  1146. );
  1147. }
  1148. if (!utils.isObject(V)) {
  1149. V = null;
  1150. } else {
  1151. V = OnErrorEventHandlerNonNull.convert(globalObject, V, {
  1152. context: "Failed to set the 'onerror' property on 'HTMLElement': The provided value"
  1153. });
  1154. }
  1155. esValue[implSymbol]["onerror"] = V;
  1156. }
  1157. get onfocus() {
  1158. const esValue = this !== null && this !== undefined ? this : globalObject;
  1159. if (!exports.is(esValue)) {
  1160. throw new globalObject.TypeError(
  1161. "'get onfocus' called on an object that is not a valid instance of HTMLElement."
  1162. );
  1163. }
  1164. return utils.tryWrapperForImpl(esValue[implSymbol]["onfocus"]);
  1165. }
  1166. set onfocus(V) {
  1167. const esValue = this !== null && this !== undefined ? this : globalObject;
  1168. if (!exports.is(esValue)) {
  1169. throw new globalObject.TypeError(
  1170. "'set onfocus' called on an object that is not a valid instance of HTMLElement."
  1171. );
  1172. }
  1173. if (!utils.isObject(V)) {
  1174. V = null;
  1175. } else {
  1176. V = EventHandlerNonNull.convert(globalObject, V, {
  1177. context: "Failed to set the 'onfocus' property on 'HTMLElement': The provided value"
  1178. });
  1179. }
  1180. esValue[implSymbol]["onfocus"] = V;
  1181. }
  1182. get onformdata() {
  1183. const esValue = this !== null && this !== undefined ? this : globalObject;
  1184. if (!exports.is(esValue)) {
  1185. throw new globalObject.TypeError(
  1186. "'get onformdata' called on an object that is not a valid instance of HTMLElement."
  1187. );
  1188. }
  1189. return utils.tryWrapperForImpl(esValue[implSymbol]["onformdata"]);
  1190. }
  1191. set onformdata(V) {
  1192. const esValue = this !== null && this !== undefined ? this : globalObject;
  1193. if (!exports.is(esValue)) {
  1194. throw new globalObject.TypeError(
  1195. "'set onformdata' called on an object that is not a valid instance of HTMLElement."
  1196. );
  1197. }
  1198. if (!utils.isObject(V)) {
  1199. V = null;
  1200. } else {
  1201. V = EventHandlerNonNull.convert(globalObject, V, {
  1202. context: "Failed to set the 'onformdata' property on 'HTMLElement': The provided value"
  1203. });
  1204. }
  1205. esValue[implSymbol]["onformdata"] = V;
  1206. }
  1207. get oninput() {
  1208. const esValue = this !== null && this !== undefined ? this : globalObject;
  1209. if (!exports.is(esValue)) {
  1210. throw new globalObject.TypeError(
  1211. "'get oninput' called on an object that is not a valid instance of HTMLElement."
  1212. );
  1213. }
  1214. return utils.tryWrapperForImpl(esValue[implSymbol]["oninput"]);
  1215. }
  1216. set oninput(V) {
  1217. const esValue = this !== null && this !== undefined ? this : globalObject;
  1218. if (!exports.is(esValue)) {
  1219. throw new globalObject.TypeError(
  1220. "'set oninput' called on an object that is not a valid instance of HTMLElement."
  1221. );
  1222. }
  1223. if (!utils.isObject(V)) {
  1224. V = null;
  1225. } else {
  1226. V = EventHandlerNonNull.convert(globalObject, V, {
  1227. context: "Failed to set the 'oninput' property on 'HTMLElement': The provided value"
  1228. });
  1229. }
  1230. esValue[implSymbol]["oninput"] = V;
  1231. }
  1232. get oninvalid() {
  1233. const esValue = this !== null && this !== undefined ? this : globalObject;
  1234. if (!exports.is(esValue)) {
  1235. throw new globalObject.TypeError(
  1236. "'get oninvalid' called on an object that is not a valid instance of HTMLElement."
  1237. );
  1238. }
  1239. return utils.tryWrapperForImpl(esValue[implSymbol]["oninvalid"]);
  1240. }
  1241. set oninvalid(V) {
  1242. const esValue = this !== null && this !== undefined ? this : globalObject;
  1243. if (!exports.is(esValue)) {
  1244. throw new globalObject.TypeError(
  1245. "'set oninvalid' called on an object that is not a valid instance of HTMLElement."
  1246. );
  1247. }
  1248. if (!utils.isObject(V)) {
  1249. V = null;
  1250. } else {
  1251. V = EventHandlerNonNull.convert(globalObject, V, {
  1252. context: "Failed to set the 'oninvalid' property on 'HTMLElement': The provided value"
  1253. });
  1254. }
  1255. esValue[implSymbol]["oninvalid"] = V;
  1256. }
  1257. get onkeydown() {
  1258. const esValue = this !== null && this !== undefined ? this : globalObject;
  1259. if (!exports.is(esValue)) {
  1260. throw new globalObject.TypeError(
  1261. "'get onkeydown' called on an object that is not a valid instance of HTMLElement."
  1262. );
  1263. }
  1264. return utils.tryWrapperForImpl(esValue[implSymbol]["onkeydown"]);
  1265. }
  1266. set onkeydown(V) {
  1267. const esValue = this !== null && this !== undefined ? this : globalObject;
  1268. if (!exports.is(esValue)) {
  1269. throw new globalObject.TypeError(
  1270. "'set onkeydown' called on an object that is not a valid instance of HTMLElement."
  1271. );
  1272. }
  1273. if (!utils.isObject(V)) {
  1274. V = null;
  1275. } else {
  1276. V = EventHandlerNonNull.convert(globalObject, V, {
  1277. context: "Failed to set the 'onkeydown' property on 'HTMLElement': The provided value"
  1278. });
  1279. }
  1280. esValue[implSymbol]["onkeydown"] = V;
  1281. }
  1282. get onkeypress() {
  1283. const esValue = this !== null && this !== undefined ? this : globalObject;
  1284. if (!exports.is(esValue)) {
  1285. throw new globalObject.TypeError(
  1286. "'get onkeypress' called on an object that is not a valid instance of HTMLElement."
  1287. );
  1288. }
  1289. return utils.tryWrapperForImpl(esValue[implSymbol]["onkeypress"]);
  1290. }
  1291. set onkeypress(V) {
  1292. const esValue = this !== null && this !== undefined ? this : globalObject;
  1293. if (!exports.is(esValue)) {
  1294. throw new globalObject.TypeError(
  1295. "'set onkeypress' called on an object that is not a valid instance of HTMLElement."
  1296. );
  1297. }
  1298. if (!utils.isObject(V)) {
  1299. V = null;
  1300. } else {
  1301. V = EventHandlerNonNull.convert(globalObject, V, {
  1302. context: "Failed to set the 'onkeypress' property on 'HTMLElement': The provided value"
  1303. });
  1304. }
  1305. esValue[implSymbol]["onkeypress"] = V;
  1306. }
  1307. get onkeyup() {
  1308. const esValue = this !== null && this !== undefined ? this : globalObject;
  1309. if (!exports.is(esValue)) {
  1310. throw new globalObject.TypeError(
  1311. "'get onkeyup' called on an object that is not a valid instance of HTMLElement."
  1312. );
  1313. }
  1314. return utils.tryWrapperForImpl(esValue[implSymbol]["onkeyup"]);
  1315. }
  1316. set onkeyup(V) {
  1317. const esValue = this !== null && this !== undefined ? this : globalObject;
  1318. if (!exports.is(esValue)) {
  1319. throw new globalObject.TypeError(
  1320. "'set onkeyup' called on an object that is not a valid instance of HTMLElement."
  1321. );
  1322. }
  1323. if (!utils.isObject(V)) {
  1324. V = null;
  1325. } else {
  1326. V = EventHandlerNonNull.convert(globalObject, V, {
  1327. context: "Failed to set the 'onkeyup' property on 'HTMLElement': The provided value"
  1328. });
  1329. }
  1330. esValue[implSymbol]["onkeyup"] = V;
  1331. }
  1332. get onload() {
  1333. const esValue = this !== null && this !== undefined ? this : globalObject;
  1334. if (!exports.is(esValue)) {
  1335. throw new globalObject.TypeError(
  1336. "'get onload' called on an object that is not a valid instance of HTMLElement."
  1337. );
  1338. }
  1339. return utils.tryWrapperForImpl(esValue[implSymbol]["onload"]);
  1340. }
  1341. set onload(V) {
  1342. const esValue = this !== null && this !== undefined ? this : globalObject;
  1343. if (!exports.is(esValue)) {
  1344. throw new globalObject.TypeError(
  1345. "'set onload' called on an object that is not a valid instance of HTMLElement."
  1346. );
  1347. }
  1348. if (!utils.isObject(V)) {
  1349. V = null;
  1350. } else {
  1351. V = EventHandlerNonNull.convert(globalObject, V, {
  1352. context: "Failed to set the 'onload' property on 'HTMLElement': The provided value"
  1353. });
  1354. }
  1355. esValue[implSymbol]["onload"] = V;
  1356. }
  1357. get onloadeddata() {
  1358. const esValue = this !== null && this !== undefined ? this : globalObject;
  1359. if (!exports.is(esValue)) {
  1360. throw new globalObject.TypeError(
  1361. "'get onloadeddata' called on an object that is not a valid instance of HTMLElement."
  1362. );
  1363. }
  1364. return utils.tryWrapperForImpl(esValue[implSymbol]["onloadeddata"]);
  1365. }
  1366. set onloadeddata(V) {
  1367. const esValue = this !== null && this !== undefined ? this : globalObject;
  1368. if (!exports.is(esValue)) {
  1369. throw new globalObject.TypeError(
  1370. "'set onloadeddata' called on an object that is not a valid instance of HTMLElement."
  1371. );
  1372. }
  1373. if (!utils.isObject(V)) {
  1374. V = null;
  1375. } else {
  1376. V = EventHandlerNonNull.convert(globalObject, V, {
  1377. context: "Failed to set the 'onloadeddata' property on 'HTMLElement': The provided value"
  1378. });
  1379. }
  1380. esValue[implSymbol]["onloadeddata"] = V;
  1381. }
  1382. get onloadedmetadata() {
  1383. const esValue = this !== null && this !== undefined ? this : globalObject;
  1384. if (!exports.is(esValue)) {
  1385. throw new globalObject.TypeError(
  1386. "'get onloadedmetadata' called on an object that is not a valid instance of HTMLElement."
  1387. );
  1388. }
  1389. return utils.tryWrapperForImpl(esValue[implSymbol]["onloadedmetadata"]);
  1390. }
  1391. set onloadedmetadata(V) {
  1392. const esValue = this !== null && this !== undefined ? this : globalObject;
  1393. if (!exports.is(esValue)) {
  1394. throw new globalObject.TypeError(
  1395. "'set onloadedmetadata' called on an object that is not a valid instance of HTMLElement."
  1396. );
  1397. }
  1398. if (!utils.isObject(V)) {
  1399. V = null;
  1400. } else {
  1401. V = EventHandlerNonNull.convert(globalObject, V, {
  1402. context: "Failed to set the 'onloadedmetadata' property on 'HTMLElement': The provided value"
  1403. });
  1404. }
  1405. esValue[implSymbol]["onloadedmetadata"] = V;
  1406. }
  1407. get onloadstart() {
  1408. const esValue = this !== null && this !== undefined ? this : globalObject;
  1409. if (!exports.is(esValue)) {
  1410. throw new globalObject.TypeError(
  1411. "'get onloadstart' called on an object that is not a valid instance of HTMLElement."
  1412. );
  1413. }
  1414. return utils.tryWrapperForImpl(esValue[implSymbol]["onloadstart"]);
  1415. }
  1416. set onloadstart(V) {
  1417. const esValue = this !== null && this !== undefined ? this : globalObject;
  1418. if (!exports.is(esValue)) {
  1419. throw new globalObject.TypeError(
  1420. "'set onloadstart' called on an object that is not a valid instance of HTMLElement."
  1421. );
  1422. }
  1423. if (!utils.isObject(V)) {
  1424. V = null;
  1425. } else {
  1426. V = EventHandlerNonNull.convert(globalObject, V, {
  1427. context: "Failed to set the 'onloadstart' property on 'HTMLElement': The provided value"
  1428. });
  1429. }
  1430. esValue[implSymbol]["onloadstart"] = V;
  1431. }
  1432. get onmousedown() {
  1433. const esValue = this !== null && this !== undefined ? this : globalObject;
  1434. if (!exports.is(esValue)) {
  1435. throw new globalObject.TypeError(
  1436. "'get onmousedown' called on an object that is not a valid instance of HTMLElement."
  1437. );
  1438. }
  1439. return utils.tryWrapperForImpl(esValue[implSymbol]["onmousedown"]);
  1440. }
  1441. set onmousedown(V) {
  1442. const esValue = this !== null && this !== undefined ? this : globalObject;
  1443. if (!exports.is(esValue)) {
  1444. throw new globalObject.TypeError(
  1445. "'set onmousedown' called on an object that is not a valid instance of HTMLElement."
  1446. );
  1447. }
  1448. if (!utils.isObject(V)) {
  1449. V = null;
  1450. } else {
  1451. V = EventHandlerNonNull.convert(globalObject, V, {
  1452. context: "Failed to set the 'onmousedown' property on 'HTMLElement': The provided value"
  1453. });
  1454. }
  1455. esValue[implSymbol]["onmousedown"] = V;
  1456. }
  1457. get onmouseenter() {
  1458. const esValue = this !== null && this !== undefined ? this : globalObject;
  1459. if (!exports.is(esValue)) {
  1460. return;
  1461. }
  1462. return utils.tryWrapperForImpl(esValue[implSymbol]["onmouseenter"]);
  1463. }
  1464. set onmouseenter(V) {
  1465. const esValue = this !== null && this !== undefined ? this : globalObject;
  1466. if (!exports.is(esValue)) {
  1467. return;
  1468. }
  1469. if (!utils.isObject(V)) {
  1470. V = null;
  1471. } else {
  1472. V = EventHandlerNonNull.convert(globalObject, V, {
  1473. context: "Failed to set the 'onmouseenter' property on 'HTMLElement': The provided value"
  1474. });
  1475. }
  1476. esValue[implSymbol]["onmouseenter"] = V;
  1477. }
  1478. get onmouseleave() {
  1479. const esValue = this !== null && this !== undefined ? this : globalObject;
  1480. if (!exports.is(esValue)) {
  1481. return;
  1482. }
  1483. return utils.tryWrapperForImpl(esValue[implSymbol]["onmouseleave"]);
  1484. }
  1485. set onmouseleave(V) {
  1486. const esValue = this !== null && this !== undefined ? this : globalObject;
  1487. if (!exports.is(esValue)) {
  1488. return;
  1489. }
  1490. if (!utils.isObject(V)) {
  1491. V = null;
  1492. } else {
  1493. V = EventHandlerNonNull.convert(globalObject, V, {
  1494. context: "Failed to set the 'onmouseleave' property on 'HTMLElement': The provided value"
  1495. });
  1496. }
  1497. esValue[implSymbol]["onmouseleave"] = V;
  1498. }
  1499. get onmousemove() {
  1500. const esValue = this !== null && this !== undefined ? this : globalObject;
  1501. if (!exports.is(esValue)) {
  1502. throw new globalObject.TypeError(
  1503. "'get onmousemove' called on an object that is not a valid instance of HTMLElement."
  1504. );
  1505. }
  1506. return utils.tryWrapperForImpl(esValue[implSymbol]["onmousemove"]);
  1507. }
  1508. set onmousemove(V) {
  1509. const esValue = this !== null && this !== undefined ? this : globalObject;
  1510. if (!exports.is(esValue)) {
  1511. throw new globalObject.TypeError(
  1512. "'set onmousemove' called on an object that is not a valid instance of HTMLElement."
  1513. );
  1514. }
  1515. if (!utils.isObject(V)) {
  1516. V = null;
  1517. } else {
  1518. V = EventHandlerNonNull.convert(globalObject, V, {
  1519. context: "Failed to set the 'onmousemove' property on 'HTMLElement': The provided value"
  1520. });
  1521. }
  1522. esValue[implSymbol]["onmousemove"] = V;
  1523. }
  1524. get onmouseout() {
  1525. const esValue = this !== null && this !== undefined ? this : globalObject;
  1526. if (!exports.is(esValue)) {
  1527. throw new globalObject.TypeError(
  1528. "'get onmouseout' called on an object that is not a valid instance of HTMLElement."
  1529. );
  1530. }
  1531. return utils.tryWrapperForImpl(esValue[implSymbol]["onmouseout"]);
  1532. }
  1533. set onmouseout(V) {
  1534. const esValue = this !== null && this !== undefined ? this : globalObject;
  1535. if (!exports.is(esValue)) {
  1536. throw new globalObject.TypeError(
  1537. "'set onmouseout' called on an object that is not a valid instance of HTMLElement."
  1538. );
  1539. }
  1540. if (!utils.isObject(V)) {
  1541. V = null;
  1542. } else {
  1543. V = EventHandlerNonNull.convert(globalObject, V, {
  1544. context: "Failed to set the 'onmouseout' property on 'HTMLElement': The provided value"
  1545. });
  1546. }
  1547. esValue[implSymbol]["onmouseout"] = V;
  1548. }
  1549. get onmouseover() {
  1550. const esValue = this !== null && this !== undefined ? this : globalObject;
  1551. if (!exports.is(esValue)) {
  1552. throw new globalObject.TypeError(
  1553. "'get onmouseover' called on an object that is not a valid instance of HTMLElement."
  1554. );
  1555. }
  1556. return utils.tryWrapperForImpl(esValue[implSymbol]["onmouseover"]);
  1557. }
  1558. set onmouseover(V) {
  1559. const esValue = this !== null && this !== undefined ? this : globalObject;
  1560. if (!exports.is(esValue)) {
  1561. throw new globalObject.TypeError(
  1562. "'set onmouseover' called on an object that is not a valid instance of HTMLElement."
  1563. );
  1564. }
  1565. if (!utils.isObject(V)) {
  1566. V = null;
  1567. } else {
  1568. V = EventHandlerNonNull.convert(globalObject, V, {
  1569. context: "Failed to set the 'onmouseover' property on 'HTMLElement': The provided value"
  1570. });
  1571. }
  1572. esValue[implSymbol]["onmouseover"] = V;
  1573. }
  1574. get onmouseup() {
  1575. const esValue = this !== null && this !== undefined ? this : globalObject;
  1576. if (!exports.is(esValue)) {
  1577. throw new globalObject.TypeError(
  1578. "'get onmouseup' called on an object that is not a valid instance of HTMLElement."
  1579. );
  1580. }
  1581. return utils.tryWrapperForImpl(esValue[implSymbol]["onmouseup"]);
  1582. }
  1583. set onmouseup(V) {
  1584. const esValue = this !== null && this !== undefined ? this : globalObject;
  1585. if (!exports.is(esValue)) {
  1586. throw new globalObject.TypeError(
  1587. "'set onmouseup' called on an object that is not a valid instance of HTMLElement."
  1588. );
  1589. }
  1590. if (!utils.isObject(V)) {
  1591. V = null;
  1592. } else {
  1593. V = EventHandlerNonNull.convert(globalObject, V, {
  1594. context: "Failed to set the 'onmouseup' property on 'HTMLElement': The provided value"
  1595. });
  1596. }
  1597. esValue[implSymbol]["onmouseup"] = V;
  1598. }
  1599. get onpaste() {
  1600. const esValue = this !== null && this !== undefined ? this : globalObject;
  1601. if (!exports.is(esValue)) {
  1602. throw new globalObject.TypeError(
  1603. "'get onpaste' called on an object that is not a valid instance of HTMLElement."
  1604. );
  1605. }
  1606. return utils.tryWrapperForImpl(esValue[implSymbol]["onpaste"]);
  1607. }
  1608. set onpaste(V) {
  1609. const esValue = this !== null && this !== undefined ? this : globalObject;
  1610. if (!exports.is(esValue)) {
  1611. throw new globalObject.TypeError(
  1612. "'set onpaste' called on an object that is not a valid instance of HTMLElement."
  1613. );
  1614. }
  1615. if (!utils.isObject(V)) {
  1616. V = null;
  1617. } else {
  1618. V = EventHandlerNonNull.convert(globalObject, V, {
  1619. context: "Failed to set the 'onpaste' property on 'HTMLElement': The provided value"
  1620. });
  1621. }
  1622. esValue[implSymbol]["onpaste"] = V;
  1623. }
  1624. get onpause() {
  1625. const esValue = this !== null && this !== undefined ? this : globalObject;
  1626. if (!exports.is(esValue)) {
  1627. throw new globalObject.TypeError(
  1628. "'get onpause' called on an object that is not a valid instance of HTMLElement."
  1629. );
  1630. }
  1631. return utils.tryWrapperForImpl(esValue[implSymbol]["onpause"]);
  1632. }
  1633. set onpause(V) {
  1634. const esValue = this !== null && this !== undefined ? this : globalObject;
  1635. if (!exports.is(esValue)) {
  1636. throw new globalObject.TypeError(
  1637. "'set onpause' called on an object that is not a valid instance of HTMLElement."
  1638. );
  1639. }
  1640. if (!utils.isObject(V)) {
  1641. V = null;
  1642. } else {
  1643. V = EventHandlerNonNull.convert(globalObject, V, {
  1644. context: "Failed to set the 'onpause' property on 'HTMLElement': The provided value"
  1645. });
  1646. }
  1647. esValue[implSymbol]["onpause"] = V;
  1648. }
  1649. get onplay() {
  1650. const esValue = this !== null && this !== undefined ? this : globalObject;
  1651. if (!exports.is(esValue)) {
  1652. throw new globalObject.TypeError(
  1653. "'get onplay' called on an object that is not a valid instance of HTMLElement."
  1654. );
  1655. }
  1656. return utils.tryWrapperForImpl(esValue[implSymbol]["onplay"]);
  1657. }
  1658. set onplay(V) {
  1659. const esValue = this !== null && this !== undefined ? this : globalObject;
  1660. if (!exports.is(esValue)) {
  1661. throw new globalObject.TypeError(
  1662. "'set onplay' called on an object that is not a valid instance of HTMLElement."
  1663. );
  1664. }
  1665. if (!utils.isObject(V)) {
  1666. V = null;
  1667. } else {
  1668. V = EventHandlerNonNull.convert(globalObject, V, {
  1669. context: "Failed to set the 'onplay' property on 'HTMLElement': The provided value"
  1670. });
  1671. }
  1672. esValue[implSymbol]["onplay"] = V;
  1673. }
  1674. get onplaying() {
  1675. const esValue = this !== null && this !== undefined ? this : globalObject;
  1676. if (!exports.is(esValue)) {
  1677. throw new globalObject.TypeError(
  1678. "'get onplaying' called on an object that is not a valid instance of HTMLElement."
  1679. );
  1680. }
  1681. return utils.tryWrapperForImpl(esValue[implSymbol]["onplaying"]);
  1682. }
  1683. set onplaying(V) {
  1684. const esValue = this !== null && this !== undefined ? this : globalObject;
  1685. if (!exports.is(esValue)) {
  1686. throw new globalObject.TypeError(
  1687. "'set onplaying' called on an object that is not a valid instance of HTMLElement."
  1688. );
  1689. }
  1690. if (!utils.isObject(V)) {
  1691. V = null;
  1692. } else {
  1693. V = EventHandlerNonNull.convert(globalObject, V, {
  1694. context: "Failed to set the 'onplaying' property on 'HTMLElement': The provided value"
  1695. });
  1696. }
  1697. esValue[implSymbol]["onplaying"] = V;
  1698. }
  1699. get onprogress() {
  1700. const esValue = this !== null && this !== undefined ? this : globalObject;
  1701. if (!exports.is(esValue)) {
  1702. throw new globalObject.TypeError(
  1703. "'get onprogress' called on an object that is not a valid instance of HTMLElement."
  1704. );
  1705. }
  1706. return utils.tryWrapperForImpl(esValue[implSymbol]["onprogress"]);
  1707. }
  1708. set onprogress(V) {
  1709. const esValue = this !== null && this !== undefined ? this : globalObject;
  1710. if (!exports.is(esValue)) {
  1711. throw new globalObject.TypeError(
  1712. "'set onprogress' called on an object that is not a valid instance of HTMLElement."
  1713. );
  1714. }
  1715. if (!utils.isObject(V)) {
  1716. V = null;
  1717. } else {
  1718. V = EventHandlerNonNull.convert(globalObject, V, {
  1719. context: "Failed to set the 'onprogress' property on 'HTMLElement': The provided value"
  1720. });
  1721. }
  1722. esValue[implSymbol]["onprogress"] = V;
  1723. }
  1724. get onratechange() {
  1725. const esValue = this !== null && this !== undefined ? this : globalObject;
  1726. if (!exports.is(esValue)) {
  1727. throw new globalObject.TypeError(
  1728. "'get onratechange' called on an object that is not a valid instance of HTMLElement."
  1729. );
  1730. }
  1731. return utils.tryWrapperForImpl(esValue[implSymbol]["onratechange"]);
  1732. }
  1733. set onratechange(V) {
  1734. const esValue = this !== null && this !== undefined ? this : globalObject;
  1735. if (!exports.is(esValue)) {
  1736. throw new globalObject.TypeError(
  1737. "'set onratechange' called on an object that is not a valid instance of HTMLElement."
  1738. );
  1739. }
  1740. if (!utils.isObject(V)) {
  1741. V = null;
  1742. } else {
  1743. V = EventHandlerNonNull.convert(globalObject, V, {
  1744. context: "Failed to set the 'onratechange' property on 'HTMLElement': The provided value"
  1745. });
  1746. }
  1747. esValue[implSymbol]["onratechange"] = V;
  1748. }
  1749. get onreset() {
  1750. const esValue = this !== null && this !== undefined ? this : globalObject;
  1751. if (!exports.is(esValue)) {
  1752. throw new globalObject.TypeError(
  1753. "'get onreset' called on an object that is not a valid instance of HTMLElement."
  1754. );
  1755. }
  1756. return utils.tryWrapperForImpl(esValue[implSymbol]["onreset"]);
  1757. }
  1758. set onreset(V) {
  1759. const esValue = this !== null && this !== undefined ? this : globalObject;
  1760. if (!exports.is(esValue)) {
  1761. throw new globalObject.TypeError(
  1762. "'set onreset' called on an object that is not a valid instance of HTMLElement."
  1763. );
  1764. }
  1765. if (!utils.isObject(V)) {
  1766. V = null;
  1767. } else {
  1768. V = EventHandlerNonNull.convert(globalObject, V, {
  1769. context: "Failed to set the 'onreset' property on 'HTMLElement': The provided value"
  1770. });
  1771. }
  1772. esValue[implSymbol]["onreset"] = V;
  1773. }
  1774. get onresize() {
  1775. const esValue = this !== null && this !== undefined ? this : globalObject;
  1776. if (!exports.is(esValue)) {
  1777. throw new globalObject.TypeError(
  1778. "'get onresize' called on an object that is not a valid instance of HTMLElement."
  1779. );
  1780. }
  1781. return utils.tryWrapperForImpl(esValue[implSymbol]["onresize"]);
  1782. }
  1783. set onresize(V) {
  1784. const esValue = this !== null && this !== undefined ? this : globalObject;
  1785. if (!exports.is(esValue)) {
  1786. throw new globalObject.TypeError(
  1787. "'set onresize' called on an object that is not a valid instance of HTMLElement."
  1788. );
  1789. }
  1790. if (!utils.isObject(V)) {
  1791. V = null;
  1792. } else {
  1793. V = EventHandlerNonNull.convert(globalObject, V, {
  1794. context: "Failed to set the 'onresize' property on 'HTMLElement': The provided value"
  1795. });
  1796. }
  1797. esValue[implSymbol]["onresize"] = V;
  1798. }
  1799. get onscroll() {
  1800. const esValue = this !== null && this !== undefined ? this : globalObject;
  1801. if (!exports.is(esValue)) {
  1802. throw new globalObject.TypeError(
  1803. "'get onscroll' called on an object that is not a valid instance of HTMLElement."
  1804. );
  1805. }
  1806. return utils.tryWrapperForImpl(esValue[implSymbol]["onscroll"]);
  1807. }
  1808. set onscroll(V) {
  1809. const esValue = this !== null && this !== undefined ? this : globalObject;
  1810. if (!exports.is(esValue)) {
  1811. throw new globalObject.TypeError(
  1812. "'set onscroll' called on an object that is not a valid instance of HTMLElement."
  1813. );
  1814. }
  1815. if (!utils.isObject(V)) {
  1816. V = null;
  1817. } else {
  1818. V = EventHandlerNonNull.convert(globalObject, V, {
  1819. context: "Failed to set the 'onscroll' property on 'HTMLElement': The provided value"
  1820. });
  1821. }
  1822. esValue[implSymbol]["onscroll"] = V;
  1823. }
  1824. get onscrollend() {
  1825. const esValue = this !== null && this !== undefined ? this : globalObject;
  1826. if (!exports.is(esValue)) {
  1827. throw new globalObject.TypeError(
  1828. "'get onscrollend' called on an object that is not a valid instance of HTMLElement."
  1829. );
  1830. }
  1831. return utils.tryWrapperForImpl(esValue[implSymbol]["onscrollend"]);
  1832. }
  1833. set onscrollend(V) {
  1834. const esValue = this !== null && this !== undefined ? this : globalObject;
  1835. if (!exports.is(esValue)) {
  1836. throw new globalObject.TypeError(
  1837. "'set onscrollend' called on an object that is not a valid instance of HTMLElement."
  1838. );
  1839. }
  1840. if (!utils.isObject(V)) {
  1841. V = null;
  1842. } else {
  1843. V = EventHandlerNonNull.convert(globalObject, V, {
  1844. context: "Failed to set the 'onscrollend' property on 'HTMLElement': The provided value"
  1845. });
  1846. }
  1847. esValue[implSymbol]["onscrollend"] = V;
  1848. }
  1849. get onsecuritypolicyviolation() {
  1850. const esValue = this !== null && this !== undefined ? this : globalObject;
  1851. if (!exports.is(esValue)) {
  1852. throw new globalObject.TypeError(
  1853. "'get onsecuritypolicyviolation' called on an object that is not a valid instance of HTMLElement."
  1854. );
  1855. }
  1856. return utils.tryWrapperForImpl(esValue[implSymbol]["onsecuritypolicyviolation"]);
  1857. }
  1858. set onsecuritypolicyviolation(V) {
  1859. const esValue = this !== null && this !== undefined ? this : globalObject;
  1860. if (!exports.is(esValue)) {
  1861. throw new globalObject.TypeError(
  1862. "'set onsecuritypolicyviolation' called on an object that is not a valid instance of HTMLElement."
  1863. );
  1864. }
  1865. if (!utils.isObject(V)) {
  1866. V = null;
  1867. } else {
  1868. V = EventHandlerNonNull.convert(globalObject, V, {
  1869. context: "Failed to set the 'onsecuritypolicyviolation' property on 'HTMLElement': The provided value"
  1870. });
  1871. }
  1872. esValue[implSymbol]["onsecuritypolicyviolation"] = V;
  1873. }
  1874. get onseeked() {
  1875. const esValue = this !== null && this !== undefined ? this : globalObject;
  1876. if (!exports.is(esValue)) {
  1877. throw new globalObject.TypeError(
  1878. "'get onseeked' called on an object that is not a valid instance of HTMLElement."
  1879. );
  1880. }
  1881. return utils.tryWrapperForImpl(esValue[implSymbol]["onseeked"]);
  1882. }
  1883. set onseeked(V) {
  1884. const esValue = this !== null && this !== undefined ? this : globalObject;
  1885. if (!exports.is(esValue)) {
  1886. throw new globalObject.TypeError(
  1887. "'set onseeked' called on an object that is not a valid instance of HTMLElement."
  1888. );
  1889. }
  1890. if (!utils.isObject(V)) {
  1891. V = null;
  1892. } else {
  1893. V = EventHandlerNonNull.convert(globalObject, V, {
  1894. context: "Failed to set the 'onseeked' property on 'HTMLElement': The provided value"
  1895. });
  1896. }
  1897. esValue[implSymbol]["onseeked"] = V;
  1898. }
  1899. get onseeking() {
  1900. const esValue = this !== null && this !== undefined ? this : globalObject;
  1901. if (!exports.is(esValue)) {
  1902. throw new globalObject.TypeError(
  1903. "'get onseeking' called on an object that is not a valid instance of HTMLElement."
  1904. );
  1905. }
  1906. return utils.tryWrapperForImpl(esValue[implSymbol]["onseeking"]);
  1907. }
  1908. set onseeking(V) {
  1909. const esValue = this !== null && this !== undefined ? this : globalObject;
  1910. if (!exports.is(esValue)) {
  1911. throw new globalObject.TypeError(
  1912. "'set onseeking' called on an object that is not a valid instance of HTMLElement."
  1913. );
  1914. }
  1915. if (!utils.isObject(V)) {
  1916. V = null;
  1917. } else {
  1918. V = EventHandlerNonNull.convert(globalObject, V, {
  1919. context: "Failed to set the 'onseeking' property on 'HTMLElement': The provided value"
  1920. });
  1921. }
  1922. esValue[implSymbol]["onseeking"] = V;
  1923. }
  1924. get onselect() {
  1925. const esValue = this !== null && this !== undefined ? this : globalObject;
  1926. if (!exports.is(esValue)) {
  1927. throw new globalObject.TypeError(
  1928. "'get onselect' called on an object that is not a valid instance of HTMLElement."
  1929. );
  1930. }
  1931. return utils.tryWrapperForImpl(esValue[implSymbol]["onselect"]);
  1932. }
  1933. set onselect(V) {
  1934. const esValue = this !== null && this !== undefined ? this : globalObject;
  1935. if (!exports.is(esValue)) {
  1936. throw new globalObject.TypeError(
  1937. "'set onselect' called on an object that is not a valid instance of HTMLElement."
  1938. );
  1939. }
  1940. if (!utils.isObject(V)) {
  1941. V = null;
  1942. } else {
  1943. V = EventHandlerNonNull.convert(globalObject, V, {
  1944. context: "Failed to set the 'onselect' property on 'HTMLElement': The provided value"
  1945. });
  1946. }
  1947. esValue[implSymbol]["onselect"] = V;
  1948. }
  1949. get onslotchange() {
  1950. const esValue = this !== null && this !== undefined ? this : globalObject;
  1951. if (!exports.is(esValue)) {
  1952. throw new globalObject.TypeError(
  1953. "'get onslotchange' called on an object that is not a valid instance of HTMLElement."
  1954. );
  1955. }
  1956. return utils.tryWrapperForImpl(esValue[implSymbol]["onslotchange"]);
  1957. }
  1958. set onslotchange(V) {
  1959. const esValue = this !== null && this !== undefined ? this : globalObject;
  1960. if (!exports.is(esValue)) {
  1961. throw new globalObject.TypeError(
  1962. "'set onslotchange' called on an object that is not a valid instance of HTMLElement."
  1963. );
  1964. }
  1965. if (!utils.isObject(V)) {
  1966. V = null;
  1967. } else {
  1968. V = EventHandlerNonNull.convert(globalObject, V, {
  1969. context: "Failed to set the 'onslotchange' property on 'HTMLElement': The provided value"
  1970. });
  1971. }
  1972. esValue[implSymbol]["onslotchange"] = V;
  1973. }
  1974. get onstalled() {
  1975. const esValue = this !== null && this !== undefined ? this : globalObject;
  1976. if (!exports.is(esValue)) {
  1977. throw new globalObject.TypeError(
  1978. "'get onstalled' called on an object that is not a valid instance of HTMLElement."
  1979. );
  1980. }
  1981. return utils.tryWrapperForImpl(esValue[implSymbol]["onstalled"]);
  1982. }
  1983. set onstalled(V) {
  1984. const esValue = this !== null && this !== undefined ? this : globalObject;
  1985. if (!exports.is(esValue)) {
  1986. throw new globalObject.TypeError(
  1987. "'set onstalled' called on an object that is not a valid instance of HTMLElement."
  1988. );
  1989. }
  1990. if (!utils.isObject(V)) {
  1991. V = null;
  1992. } else {
  1993. V = EventHandlerNonNull.convert(globalObject, V, {
  1994. context: "Failed to set the 'onstalled' property on 'HTMLElement': The provided value"
  1995. });
  1996. }
  1997. esValue[implSymbol]["onstalled"] = V;
  1998. }
  1999. get onsubmit() {
  2000. const esValue = this !== null && this !== undefined ? this : globalObject;
  2001. if (!exports.is(esValue)) {
  2002. throw new globalObject.TypeError(
  2003. "'get onsubmit' called on an object that is not a valid instance of HTMLElement."
  2004. );
  2005. }
  2006. return utils.tryWrapperForImpl(esValue[implSymbol]["onsubmit"]);
  2007. }
  2008. set onsubmit(V) {
  2009. const esValue = this !== null && this !== undefined ? this : globalObject;
  2010. if (!exports.is(esValue)) {
  2011. throw new globalObject.TypeError(
  2012. "'set onsubmit' called on an object that is not a valid instance of HTMLElement."
  2013. );
  2014. }
  2015. if (!utils.isObject(V)) {
  2016. V = null;
  2017. } else {
  2018. V = EventHandlerNonNull.convert(globalObject, V, {
  2019. context: "Failed to set the 'onsubmit' property on 'HTMLElement': The provided value"
  2020. });
  2021. }
  2022. esValue[implSymbol]["onsubmit"] = V;
  2023. }
  2024. get onsuspend() {
  2025. const esValue = this !== null && this !== undefined ? this : globalObject;
  2026. if (!exports.is(esValue)) {
  2027. throw new globalObject.TypeError(
  2028. "'get onsuspend' called on an object that is not a valid instance of HTMLElement."
  2029. );
  2030. }
  2031. return utils.tryWrapperForImpl(esValue[implSymbol]["onsuspend"]);
  2032. }
  2033. set onsuspend(V) {
  2034. const esValue = this !== null && this !== undefined ? this : globalObject;
  2035. if (!exports.is(esValue)) {
  2036. throw new globalObject.TypeError(
  2037. "'set onsuspend' called on an object that is not a valid instance of HTMLElement."
  2038. );
  2039. }
  2040. if (!utils.isObject(V)) {
  2041. V = null;
  2042. } else {
  2043. V = EventHandlerNonNull.convert(globalObject, V, {
  2044. context: "Failed to set the 'onsuspend' property on 'HTMLElement': The provided value"
  2045. });
  2046. }
  2047. esValue[implSymbol]["onsuspend"] = V;
  2048. }
  2049. get ontimeupdate() {
  2050. const esValue = this !== null && this !== undefined ? this : globalObject;
  2051. if (!exports.is(esValue)) {
  2052. throw new globalObject.TypeError(
  2053. "'get ontimeupdate' called on an object that is not a valid instance of HTMLElement."
  2054. );
  2055. }
  2056. return utils.tryWrapperForImpl(esValue[implSymbol]["ontimeupdate"]);
  2057. }
  2058. set ontimeupdate(V) {
  2059. const esValue = this !== null && this !== undefined ? this : globalObject;
  2060. if (!exports.is(esValue)) {
  2061. throw new globalObject.TypeError(
  2062. "'set ontimeupdate' called on an object that is not a valid instance of HTMLElement."
  2063. );
  2064. }
  2065. if (!utils.isObject(V)) {
  2066. V = null;
  2067. } else {
  2068. V = EventHandlerNonNull.convert(globalObject, V, {
  2069. context: "Failed to set the 'ontimeupdate' property on 'HTMLElement': The provided value"
  2070. });
  2071. }
  2072. esValue[implSymbol]["ontimeupdate"] = V;
  2073. }
  2074. get ontoggle() {
  2075. const esValue = this !== null && this !== undefined ? this : globalObject;
  2076. if (!exports.is(esValue)) {
  2077. throw new globalObject.TypeError(
  2078. "'get ontoggle' called on an object that is not a valid instance of HTMLElement."
  2079. );
  2080. }
  2081. return utils.tryWrapperForImpl(esValue[implSymbol]["ontoggle"]);
  2082. }
  2083. set ontoggle(V) {
  2084. const esValue = this !== null && this !== undefined ? this : globalObject;
  2085. if (!exports.is(esValue)) {
  2086. throw new globalObject.TypeError(
  2087. "'set ontoggle' called on an object that is not a valid instance of HTMLElement."
  2088. );
  2089. }
  2090. if (!utils.isObject(V)) {
  2091. V = null;
  2092. } else {
  2093. V = EventHandlerNonNull.convert(globalObject, V, {
  2094. context: "Failed to set the 'ontoggle' property on 'HTMLElement': The provided value"
  2095. });
  2096. }
  2097. esValue[implSymbol]["ontoggle"] = V;
  2098. }
  2099. get onvolumechange() {
  2100. const esValue = this !== null && this !== undefined ? this : globalObject;
  2101. if (!exports.is(esValue)) {
  2102. throw new globalObject.TypeError(
  2103. "'get onvolumechange' called on an object that is not a valid instance of HTMLElement."
  2104. );
  2105. }
  2106. return utils.tryWrapperForImpl(esValue[implSymbol]["onvolumechange"]);
  2107. }
  2108. set onvolumechange(V) {
  2109. const esValue = this !== null && this !== undefined ? this : globalObject;
  2110. if (!exports.is(esValue)) {
  2111. throw new globalObject.TypeError(
  2112. "'set onvolumechange' called on an object that is not a valid instance of HTMLElement."
  2113. );
  2114. }
  2115. if (!utils.isObject(V)) {
  2116. V = null;
  2117. } else {
  2118. V = EventHandlerNonNull.convert(globalObject, V, {
  2119. context: "Failed to set the 'onvolumechange' property on 'HTMLElement': The provided value"
  2120. });
  2121. }
  2122. esValue[implSymbol]["onvolumechange"] = V;
  2123. }
  2124. get onwaiting() {
  2125. const esValue = this !== null && this !== undefined ? this : globalObject;
  2126. if (!exports.is(esValue)) {
  2127. throw new globalObject.TypeError(
  2128. "'get onwaiting' called on an object that is not a valid instance of HTMLElement."
  2129. );
  2130. }
  2131. return utils.tryWrapperForImpl(esValue[implSymbol]["onwaiting"]);
  2132. }
  2133. set onwaiting(V) {
  2134. const esValue = this !== null && this !== undefined ? this : globalObject;
  2135. if (!exports.is(esValue)) {
  2136. throw new globalObject.TypeError(
  2137. "'set onwaiting' called on an object that is not a valid instance of HTMLElement."
  2138. );
  2139. }
  2140. if (!utils.isObject(V)) {
  2141. V = null;
  2142. } else {
  2143. V = EventHandlerNonNull.convert(globalObject, V, {
  2144. context: "Failed to set the 'onwaiting' property on 'HTMLElement': The provided value"
  2145. });
  2146. }
  2147. esValue[implSymbol]["onwaiting"] = V;
  2148. }
  2149. get onwebkitanimationend() {
  2150. const esValue = this !== null && this !== undefined ? this : globalObject;
  2151. if (!exports.is(esValue)) {
  2152. throw new globalObject.TypeError(
  2153. "'get onwebkitanimationend' called on an object that is not a valid instance of HTMLElement."
  2154. );
  2155. }
  2156. return utils.tryWrapperForImpl(esValue[implSymbol]["onwebkitanimationend"]);
  2157. }
  2158. set onwebkitanimationend(V) {
  2159. const esValue = this !== null && this !== undefined ? this : globalObject;
  2160. if (!exports.is(esValue)) {
  2161. throw new globalObject.TypeError(
  2162. "'set onwebkitanimationend' called on an object that is not a valid instance of HTMLElement."
  2163. );
  2164. }
  2165. if (!utils.isObject(V)) {
  2166. V = null;
  2167. } else {
  2168. V = EventHandlerNonNull.convert(globalObject, V, {
  2169. context: "Failed to set the 'onwebkitanimationend' property on 'HTMLElement': The provided value"
  2170. });
  2171. }
  2172. esValue[implSymbol]["onwebkitanimationend"] = V;
  2173. }
  2174. get onwebkitanimationiteration() {
  2175. const esValue = this !== null && this !== undefined ? this : globalObject;
  2176. if (!exports.is(esValue)) {
  2177. throw new globalObject.TypeError(
  2178. "'get onwebkitanimationiteration' called on an object that is not a valid instance of HTMLElement."
  2179. );
  2180. }
  2181. return utils.tryWrapperForImpl(esValue[implSymbol]["onwebkitanimationiteration"]);
  2182. }
  2183. set onwebkitanimationiteration(V) {
  2184. const esValue = this !== null && this !== undefined ? this : globalObject;
  2185. if (!exports.is(esValue)) {
  2186. throw new globalObject.TypeError(
  2187. "'set onwebkitanimationiteration' called on an object that is not a valid instance of HTMLElement."
  2188. );
  2189. }
  2190. if (!utils.isObject(V)) {
  2191. V = null;
  2192. } else {
  2193. V = EventHandlerNonNull.convert(globalObject, V, {
  2194. context: "Failed to set the 'onwebkitanimationiteration' property on 'HTMLElement': The provided value"
  2195. });
  2196. }
  2197. esValue[implSymbol]["onwebkitanimationiteration"] = V;
  2198. }
  2199. get onwebkitanimationstart() {
  2200. const esValue = this !== null && this !== undefined ? this : globalObject;
  2201. if (!exports.is(esValue)) {
  2202. throw new globalObject.TypeError(
  2203. "'get onwebkitanimationstart' called on an object that is not a valid instance of HTMLElement."
  2204. );
  2205. }
  2206. return utils.tryWrapperForImpl(esValue[implSymbol]["onwebkitanimationstart"]);
  2207. }
  2208. set onwebkitanimationstart(V) {
  2209. const esValue = this !== null && this !== undefined ? this : globalObject;
  2210. if (!exports.is(esValue)) {
  2211. throw new globalObject.TypeError(
  2212. "'set onwebkitanimationstart' called on an object that is not a valid instance of HTMLElement."
  2213. );
  2214. }
  2215. if (!utils.isObject(V)) {
  2216. V = null;
  2217. } else {
  2218. V = EventHandlerNonNull.convert(globalObject, V, {
  2219. context: "Failed to set the 'onwebkitanimationstart' property on 'HTMLElement': The provided value"
  2220. });
  2221. }
  2222. esValue[implSymbol]["onwebkitanimationstart"] = V;
  2223. }
  2224. get onwebkittransitionend() {
  2225. const esValue = this !== null && this !== undefined ? this : globalObject;
  2226. if (!exports.is(esValue)) {
  2227. throw new globalObject.TypeError(
  2228. "'get onwebkittransitionend' called on an object that is not a valid instance of HTMLElement."
  2229. );
  2230. }
  2231. return utils.tryWrapperForImpl(esValue[implSymbol]["onwebkittransitionend"]);
  2232. }
  2233. set onwebkittransitionend(V) {
  2234. const esValue = this !== null && this !== undefined ? this : globalObject;
  2235. if (!exports.is(esValue)) {
  2236. throw new globalObject.TypeError(
  2237. "'set onwebkittransitionend' called on an object that is not a valid instance of HTMLElement."
  2238. );
  2239. }
  2240. if (!utils.isObject(V)) {
  2241. V = null;
  2242. } else {
  2243. V = EventHandlerNonNull.convert(globalObject, V, {
  2244. context: "Failed to set the 'onwebkittransitionend' property on 'HTMLElement': The provided value"
  2245. });
  2246. }
  2247. esValue[implSymbol]["onwebkittransitionend"] = V;
  2248. }
  2249. get onwheel() {
  2250. const esValue = this !== null && this !== undefined ? this : globalObject;
  2251. if (!exports.is(esValue)) {
  2252. throw new globalObject.TypeError(
  2253. "'get onwheel' called on an object that is not a valid instance of HTMLElement."
  2254. );
  2255. }
  2256. return utils.tryWrapperForImpl(esValue[implSymbol]["onwheel"]);
  2257. }
  2258. set onwheel(V) {
  2259. const esValue = this !== null && this !== undefined ? this : globalObject;
  2260. if (!exports.is(esValue)) {
  2261. throw new globalObject.TypeError(
  2262. "'set onwheel' called on an object that is not a valid instance of HTMLElement."
  2263. );
  2264. }
  2265. if (!utils.isObject(V)) {
  2266. V = null;
  2267. } else {
  2268. V = EventHandlerNonNull.convert(globalObject, V, {
  2269. context: "Failed to set the 'onwheel' property on 'HTMLElement': The provided value"
  2270. });
  2271. }
  2272. esValue[implSymbol]["onwheel"] = V;
  2273. }
  2274. get ontouchstart() {
  2275. const esValue = this !== null && this !== undefined ? this : globalObject;
  2276. if (!exports.is(esValue)) {
  2277. throw new globalObject.TypeError(
  2278. "'get ontouchstart' called on an object that is not a valid instance of HTMLElement."
  2279. );
  2280. }
  2281. return utils.tryWrapperForImpl(esValue[implSymbol]["ontouchstart"]);
  2282. }
  2283. set ontouchstart(V) {
  2284. const esValue = this !== null && this !== undefined ? this : globalObject;
  2285. if (!exports.is(esValue)) {
  2286. throw new globalObject.TypeError(
  2287. "'set ontouchstart' called on an object that is not a valid instance of HTMLElement."
  2288. );
  2289. }
  2290. if (!utils.isObject(V)) {
  2291. V = null;
  2292. } else {
  2293. V = EventHandlerNonNull.convert(globalObject, V, {
  2294. context: "Failed to set the 'ontouchstart' property on 'HTMLElement': The provided value"
  2295. });
  2296. }
  2297. esValue[implSymbol]["ontouchstart"] = V;
  2298. }
  2299. get ontouchend() {
  2300. const esValue = this !== null && this !== undefined ? this : globalObject;
  2301. if (!exports.is(esValue)) {
  2302. throw new globalObject.TypeError(
  2303. "'get ontouchend' called on an object that is not a valid instance of HTMLElement."
  2304. );
  2305. }
  2306. return utils.tryWrapperForImpl(esValue[implSymbol]["ontouchend"]);
  2307. }
  2308. set ontouchend(V) {
  2309. const esValue = this !== null && this !== undefined ? this : globalObject;
  2310. if (!exports.is(esValue)) {
  2311. throw new globalObject.TypeError(
  2312. "'set ontouchend' called on an object that is not a valid instance of HTMLElement."
  2313. );
  2314. }
  2315. if (!utils.isObject(V)) {
  2316. V = null;
  2317. } else {
  2318. V = EventHandlerNonNull.convert(globalObject, V, {
  2319. context: "Failed to set the 'ontouchend' property on 'HTMLElement': The provided value"
  2320. });
  2321. }
  2322. esValue[implSymbol]["ontouchend"] = V;
  2323. }
  2324. get ontouchmove() {
  2325. const esValue = this !== null && this !== undefined ? this : globalObject;
  2326. if (!exports.is(esValue)) {
  2327. throw new globalObject.TypeError(
  2328. "'get ontouchmove' called on an object that is not a valid instance of HTMLElement."
  2329. );
  2330. }
  2331. return utils.tryWrapperForImpl(esValue[implSymbol]["ontouchmove"]);
  2332. }
  2333. set ontouchmove(V) {
  2334. const esValue = this !== null && this !== undefined ? this : globalObject;
  2335. if (!exports.is(esValue)) {
  2336. throw new globalObject.TypeError(
  2337. "'set ontouchmove' called on an object that is not a valid instance of HTMLElement."
  2338. );
  2339. }
  2340. if (!utils.isObject(V)) {
  2341. V = null;
  2342. } else {
  2343. V = EventHandlerNonNull.convert(globalObject, V, {
  2344. context: "Failed to set the 'ontouchmove' property on 'HTMLElement': The provided value"
  2345. });
  2346. }
  2347. esValue[implSymbol]["ontouchmove"] = V;
  2348. }
  2349. get ontouchcancel() {
  2350. const esValue = this !== null && this !== undefined ? this : globalObject;
  2351. if (!exports.is(esValue)) {
  2352. throw new globalObject.TypeError(
  2353. "'get ontouchcancel' called on an object that is not a valid instance of HTMLElement."
  2354. );
  2355. }
  2356. return utils.tryWrapperForImpl(esValue[implSymbol]["ontouchcancel"]);
  2357. }
  2358. set ontouchcancel(V) {
  2359. const esValue = this !== null && this !== undefined ? this : globalObject;
  2360. if (!exports.is(esValue)) {
  2361. throw new globalObject.TypeError(
  2362. "'set ontouchcancel' called on an object that is not a valid instance of HTMLElement."
  2363. );
  2364. }
  2365. if (!utils.isObject(V)) {
  2366. V = null;
  2367. } else {
  2368. V = EventHandlerNonNull.convert(globalObject, V, {
  2369. context: "Failed to set the 'ontouchcancel' property on 'HTMLElement': The provided value"
  2370. });
  2371. }
  2372. esValue[implSymbol]["ontouchcancel"] = V;
  2373. }
  2374. get onpointerover() {
  2375. const esValue = this !== null && this !== undefined ? this : globalObject;
  2376. if (!exports.is(esValue)) {
  2377. throw new globalObject.TypeError(
  2378. "'get onpointerover' called on an object that is not a valid instance of HTMLElement."
  2379. );
  2380. }
  2381. return utils.tryWrapperForImpl(esValue[implSymbol]["onpointerover"]);
  2382. }
  2383. set onpointerover(V) {
  2384. const esValue = this !== null && this !== undefined ? this : globalObject;
  2385. if (!exports.is(esValue)) {
  2386. throw new globalObject.TypeError(
  2387. "'set onpointerover' called on an object that is not a valid instance of HTMLElement."
  2388. );
  2389. }
  2390. if (!utils.isObject(V)) {
  2391. V = null;
  2392. } else {
  2393. V = EventHandlerNonNull.convert(globalObject, V, {
  2394. context: "Failed to set the 'onpointerover' property on 'HTMLElement': The provided value"
  2395. });
  2396. }
  2397. esValue[implSymbol]["onpointerover"] = V;
  2398. }
  2399. get onpointerenter() {
  2400. const esValue = this !== null && this !== undefined ? this : globalObject;
  2401. if (!exports.is(esValue)) {
  2402. throw new globalObject.TypeError(
  2403. "'get onpointerenter' called on an object that is not a valid instance of HTMLElement."
  2404. );
  2405. }
  2406. return utils.tryWrapperForImpl(esValue[implSymbol]["onpointerenter"]);
  2407. }
  2408. set onpointerenter(V) {
  2409. const esValue = this !== null && this !== undefined ? this : globalObject;
  2410. if (!exports.is(esValue)) {
  2411. throw new globalObject.TypeError(
  2412. "'set onpointerenter' called on an object that is not a valid instance of HTMLElement."
  2413. );
  2414. }
  2415. if (!utils.isObject(V)) {
  2416. V = null;
  2417. } else {
  2418. V = EventHandlerNonNull.convert(globalObject, V, {
  2419. context: "Failed to set the 'onpointerenter' property on 'HTMLElement': The provided value"
  2420. });
  2421. }
  2422. esValue[implSymbol]["onpointerenter"] = V;
  2423. }
  2424. get onpointerdown() {
  2425. const esValue = this !== null && this !== undefined ? this : globalObject;
  2426. if (!exports.is(esValue)) {
  2427. throw new globalObject.TypeError(
  2428. "'get onpointerdown' called on an object that is not a valid instance of HTMLElement."
  2429. );
  2430. }
  2431. return utils.tryWrapperForImpl(esValue[implSymbol]["onpointerdown"]);
  2432. }
  2433. set onpointerdown(V) {
  2434. const esValue = this !== null && this !== undefined ? this : globalObject;
  2435. if (!exports.is(esValue)) {
  2436. throw new globalObject.TypeError(
  2437. "'set onpointerdown' called on an object that is not a valid instance of HTMLElement."
  2438. );
  2439. }
  2440. if (!utils.isObject(V)) {
  2441. V = null;
  2442. } else {
  2443. V = EventHandlerNonNull.convert(globalObject, V, {
  2444. context: "Failed to set the 'onpointerdown' property on 'HTMLElement': The provided value"
  2445. });
  2446. }
  2447. esValue[implSymbol]["onpointerdown"] = V;
  2448. }
  2449. get onpointermove() {
  2450. const esValue = this !== null && this !== undefined ? this : globalObject;
  2451. if (!exports.is(esValue)) {
  2452. throw new globalObject.TypeError(
  2453. "'get onpointermove' called on an object that is not a valid instance of HTMLElement."
  2454. );
  2455. }
  2456. return utils.tryWrapperForImpl(esValue[implSymbol]["onpointermove"]);
  2457. }
  2458. set onpointermove(V) {
  2459. const esValue = this !== null && this !== undefined ? this : globalObject;
  2460. if (!exports.is(esValue)) {
  2461. throw new globalObject.TypeError(
  2462. "'set onpointermove' called on an object that is not a valid instance of HTMLElement."
  2463. );
  2464. }
  2465. if (!utils.isObject(V)) {
  2466. V = null;
  2467. } else {
  2468. V = EventHandlerNonNull.convert(globalObject, V, {
  2469. context: "Failed to set the 'onpointermove' property on 'HTMLElement': The provided value"
  2470. });
  2471. }
  2472. esValue[implSymbol]["onpointermove"] = V;
  2473. }
  2474. get onpointerrawupdate() {
  2475. const esValue = this !== null && this !== undefined ? this : globalObject;
  2476. if (!exports.is(esValue)) {
  2477. throw new globalObject.TypeError(
  2478. "'get onpointerrawupdate' called on an object that is not a valid instance of HTMLElement."
  2479. );
  2480. }
  2481. return utils.tryWrapperForImpl(esValue[implSymbol]["onpointerrawupdate"]);
  2482. }
  2483. set onpointerrawupdate(V) {
  2484. const esValue = this !== null && this !== undefined ? this : globalObject;
  2485. if (!exports.is(esValue)) {
  2486. throw new globalObject.TypeError(
  2487. "'set onpointerrawupdate' called on an object that is not a valid instance of HTMLElement."
  2488. );
  2489. }
  2490. if (!utils.isObject(V)) {
  2491. V = null;
  2492. } else {
  2493. V = EventHandlerNonNull.convert(globalObject, V, {
  2494. context: "Failed to set the 'onpointerrawupdate' property on 'HTMLElement': The provided value"
  2495. });
  2496. }
  2497. esValue[implSymbol]["onpointerrawupdate"] = V;
  2498. }
  2499. get onpointerup() {
  2500. const esValue = this !== null && this !== undefined ? this : globalObject;
  2501. if (!exports.is(esValue)) {
  2502. throw new globalObject.TypeError(
  2503. "'get onpointerup' called on an object that is not a valid instance of HTMLElement."
  2504. );
  2505. }
  2506. return utils.tryWrapperForImpl(esValue[implSymbol]["onpointerup"]);
  2507. }
  2508. set onpointerup(V) {
  2509. const esValue = this !== null && this !== undefined ? this : globalObject;
  2510. if (!exports.is(esValue)) {
  2511. throw new globalObject.TypeError(
  2512. "'set onpointerup' called on an object that is not a valid instance of HTMLElement."
  2513. );
  2514. }
  2515. if (!utils.isObject(V)) {
  2516. V = null;
  2517. } else {
  2518. V = EventHandlerNonNull.convert(globalObject, V, {
  2519. context: "Failed to set the 'onpointerup' property on 'HTMLElement': The provided value"
  2520. });
  2521. }
  2522. esValue[implSymbol]["onpointerup"] = V;
  2523. }
  2524. get onpointercancel() {
  2525. const esValue = this !== null && this !== undefined ? this : globalObject;
  2526. if (!exports.is(esValue)) {
  2527. throw new globalObject.TypeError(
  2528. "'get onpointercancel' called on an object that is not a valid instance of HTMLElement."
  2529. );
  2530. }
  2531. return utils.tryWrapperForImpl(esValue[implSymbol]["onpointercancel"]);
  2532. }
  2533. set onpointercancel(V) {
  2534. const esValue = this !== null && this !== undefined ? this : globalObject;
  2535. if (!exports.is(esValue)) {
  2536. throw new globalObject.TypeError(
  2537. "'set onpointercancel' called on an object that is not a valid instance of HTMLElement."
  2538. );
  2539. }
  2540. if (!utils.isObject(V)) {
  2541. V = null;
  2542. } else {
  2543. V = EventHandlerNonNull.convert(globalObject, V, {
  2544. context: "Failed to set the 'onpointercancel' property on 'HTMLElement': The provided value"
  2545. });
  2546. }
  2547. esValue[implSymbol]["onpointercancel"] = V;
  2548. }
  2549. get onpointerout() {
  2550. const esValue = this !== null && this !== undefined ? this : globalObject;
  2551. if (!exports.is(esValue)) {
  2552. throw new globalObject.TypeError(
  2553. "'get onpointerout' called on an object that is not a valid instance of HTMLElement."
  2554. );
  2555. }
  2556. return utils.tryWrapperForImpl(esValue[implSymbol]["onpointerout"]);
  2557. }
  2558. set onpointerout(V) {
  2559. const esValue = this !== null && this !== undefined ? this : globalObject;
  2560. if (!exports.is(esValue)) {
  2561. throw new globalObject.TypeError(
  2562. "'set onpointerout' called on an object that is not a valid instance of HTMLElement."
  2563. );
  2564. }
  2565. if (!utils.isObject(V)) {
  2566. V = null;
  2567. } else {
  2568. V = EventHandlerNonNull.convert(globalObject, V, {
  2569. context: "Failed to set the 'onpointerout' property on 'HTMLElement': The provided value"
  2570. });
  2571. }
  2572. esValue[implSymbol]["onpointerout"] = V;
  2573. }
  2574. get onpointerleave() {
  2575. const esValue = this !== null && this !== undefined ? this : globalObject;
  2576. if (!exports.is(esValue)) {
  2577. throw new globalObject.TypeError(
  2578. "'get onpointerleave' called on an object that is not a valid instance of HTMLElement."
  2579. );
  2580. }
  2581. return utils.tryWrapperForImpl(esValue[implSymbol]["onpointerleave"]);
  2582. }
  2583. set onpointerleave(V) {
  2584. const esValue = this !== null && this !== undefined ? this : globalObject;
  2585. if (!exports.is(esValue)) {
  2586. throw new globalObject.TypeError(
  2587. "'set onpointerleave' called on an object that is not a valid instance of HTMLElement."
  2588. );
  2589. }
  2590. if (!utils.isObject(V)) {
  2591. V = null;
  2592. } else {
  2593. V = EventHandlerNonNull.convert(globalObject, V, {
  2594. context: "Failed to set the 'onpointerleave' property on 'HTMLElement': The provided value"
  2595. });
  2596. }
  2597. esValue[implSymbol]["onpointerleave"] = V;
  2598. }
  2599. get ongotpointercapture() {
  2600. const esValue = this !== null && this !== undefined ? this : globalObject;
  2601. if (!exports.is(esValue)) {
  2602. throw new globalObject.TypeError(
  2603. "'get ongotpointercapture' called on an object that is not a valid instance of HTMLElement."
  2604. );
  2605. }
  2606. return utils.tryWrapperForImpl(esValue[implSymbol]["ongotpointercapture"]);
  2607. }
  2608. set ongotpointercapture(V) {
  2609. const esValue = this !== null && this !== undefined ? this : globalObject;
  2610. if (!exports.is(esValue)) {
  2611. throw new globalObject.TypeError(
  2612. "'set ongotpointercapture' called on an object that is not a valid instance of HTMLElement."
  2613. );
  2614. }
  2615. if (!utils.isObject(V)) {
  2616. V = null;
  2617. } else {
  2618. V = EventHandlerNonNull.convert(globalObject, V, {
  2619. context: "Failed to set the 'ongotpointercapture' property on 'HTMLElement': The provided value"
  2620. });
  2621. }
  2622. esValue[implSymbol]["ongotpointercapture"] = V;
  2623. }
  2624. get onlostpointercapture() {
  2625. const esValue = this !== null && this !== undefined ? this : globalObject;
  2626. if (!exports.is(esValue)) {
  2627. throw new globalObject.TypeError(
  2628. "'get onlostpointercapture' called on an object that is not a valid instance of HTMLElement."
  2629. );
  2630. }
  2631. return utils.tryWrapperForImpl(esValue[implSymbol]["onlostpointercapture"]);
  2632. }
  2633. set onlostpointercapture(V) {
  2634. const esValue = this !== null && this !== undefined ? this : globalObject;
  2635. if (!exports.is(esValue)) {
  2636. throw new globalObject.TypeError(
  2637. "'set onlostpointercapture' called on an object that is not a valid instance of HTMLElement."
  2638. );
  2639. }
  2640. if (!utils.isObject(V)) {
  2641. V = null;
  2642. } else {
  2643. V = EventHandlerNonNull.convert(globalObject, V, {
  2644. context: "Failed to set the 'onlostpointercapture' property on 'HTMLElement': The provided value"
  2645. });
  2646. }
  2647. esValue[implSymbol]["onlostpointercapture"] = V;
  2648. }
  2649. get dataset() {
  2650. const esValue = this !== null && this !== undefined ? this : globalObject;
  2651. if (!exports.is(esValue)) {
  2652. throw new globalObject.TypeError(
  2653. "'get dataset' called on an object that is not a valid instance of HTMLElement."
  2654. );
  2655. }
  2656. return utils.getSameObject(this, "dataset", () => {
  2657. return utils.tryWrapperForImpl(esValue[implSymbol]["dataset"]);
  2658. });
  2659. }
  2660. get nonce() {
  2661. const esValue = this !== null && this !== undefined ? this : globalObject;
  2662. if (!exports.is(esValue)) {
  2663. throw new globalObject.TypeError(
  2664. "'get nonce' called on an object that is not a valid instance of HTMLElement."
  2665. );
  2666. }
  2667. const value = esValue[implSymbol]._reflectGetTheContentAttribute("nonce");
  2668. return value === null ? "" : value;
  2669. }
  2670. set nonce(V) {
  2671. const esValue = this !== null && this !== undefined ? this : globalObject;
  2672. if (!exports.is(esValue)) {
  2673. throw new globalObject.TypeError(
  2674. "'set nonce' called on an object that is not a valid instance of HTMLElement."
  2675. );
  2676. }
  2677. V = conversions["DOMString"](V, {
  2678. context: "Failed to set the 'nonce' property on 'HTMLElement': The provided value",
  2679. globals: globalObject
  2680. });
  2681. esValue[implSymbol]._reflectSetTheContentAttribute("nonce", V);
  2682. }
  2683. get tabIndex() {
  2684. const esValue = this !== null && this !== undefined ? this : globalObject;
  2685. if (!exports.is(esValue)) {
  2686. throw new globalObject.TypeError(
  2687. "'get tabIndex' called on an object that is not a valid instance of HTMLElement."
  2688. );
  2689. }
  2690. ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
  2691. try {
  2692. return esValue[implSymbol]["tabIndex"];
  2693. } finally {
  2694. ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
  2695. }
  2696. }
  2697. set tabIndex(V) {
  2698. const esValue = this !== null && this !== undefined ? this : globalObject;
  2699. if (!exports.is(esValue)) {
  2700. throw new globalObject.TypeError(
  2701. "'set tabIndex' called on an object that is not a valid instance of HTMLElement."
  2702. );
  2703. }
  2704. V = conversions["long"](V, {
  2705. context: "Failed to set the 'tabIndex' property on 'HTMLElement': The provided value",
  2706. globals: globalObject
  2707. });
  2708. ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
  2709. try {
  2710. esValue[implSymbol]["tabIndex"] = V;
  2711. } finally {
  2712. ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
  2713. }
  2714. }
  2715. }
  2716. Object.defineProperties(HTMLElement.prototype, {
  2717. click: { enumerable: true },
  2718. attachInternals: { enumerable: true },
  2719. focus: { enumerable: true },
  2720. blur: { enumerable: true },
  2721. title: { enumerable: true },
  2722. lang: { enumerable: true },
  2723. translate: { enumerable: true },
  2724. dir: { enumerable: true },
  2725. hidden: { enumerable: true },
  2726. accessKey: { enumerable: true },
  2727. draggable: { enumerable: true },
  2728. offsetParent: { enumerable: true },
  2729. offsetTop: { enumerable: true },
  2730. offsetLeft: { enumerable: true },
  2731. offsetWidth: { enumerable: true },
  2732. offsetHeight: { enumerable: true },
  2733. style: { enumerable: true },
  2734. onabort: { enumerable: true },
  2735. onauxclick: { enumerable: true },
  2736. onbeforeinput: { enumerable: true },
  2737. onbeforematch: { enumerable: true },
  2738. onbeforetoggle: { enumerable: true },
  2739. onblur: { enumerable: true },
  2740. oncancel: { enumerable: true },
  2741. oncanplay: { enumerable: true },
  2742. oncanplaythrough: { enumerable: true },
  2743. onchange: { enumerable: true },
  2744. onclick: { enumerable: true },
  2745. onclose: { enumerable: true },
  2746. oncontextlost: { enumerable: true },
  2747. oncontextmenu: { enumerable: true },
  2748. oncontextrestored: { enumerable: true },
  2749. oncopy: { enumerable: true },
  2750. oncuechange: { enumerable: true },
  2751. oncut: { enumerable: true },
  2752. ondblclick: { enumerable: true },
  2753. ondrag: { enumerable: true },
  2754. ondragend: { enumerable: true },
  2755. ondragenter: { enumerable: true },
  2756. ondragleave: { enumerable: true },
  2757. ondragover: { enumerable: true },
  2758. ondragstart: { enumerable: true },
  2759. ondrop: { enumerable: true },
  2760. ondurationchange: { enumerable: true },
  2761. onemptied: { enumerable: true },
  2762. onended: { enumerable: true },
  2763. onerror: { enumerable: true },
  2764. onfocus: { enumerable: true },
  2765. onformdata: { enumerable: true },
  2766. oninput: { enumerable: true },
  2767. oninvalid: { enumerable: true },
  2768. onkeydown: { enumerable: true },
  2769. onkeypress: { enumerable: true },
  2770. onkeyup: { enumerable: true },
  2771. onload: { enumerable: true },
  2772. onloadeddata: { enumerable: true },
  2773. onloadedmetadata: { enumerable: true },
  2774. onloadstart: { enumerable: true },
  2775. onmousedown: { enumerable: true },
  2776. onmouseenter: { enumerable: true },
  2777. onmouseleave: { enumerable: true },
  2778. onmousemove: { enumerable: true },
  2779. onmouseout: { enumerable: true },
  2780. onmouseover: { enumerable: true },
  2781. onmouseup: { enumerable: true },
  2782. onpaste: { enumerable: true },
  2783. onpause: { enumerable: true },
  2784. onplay: { enumerable: true },
  2785. onplaying: { enumerable: true },
  2786. onprogress: { enumerable: true },
  2787. onratechange: { enumerable: true },
  2788. onreset: { enumerable: true },
  2789. onresize: { enumerable: true },
  2790. onscroll: { enumerable: true },
  2791. onscrollend: { enumerable: true },
  2792. onsecuritypolicyviolation: { enumerable: true },
  2793. onseeked: { enumerable: true },
  2794. onseeking: { enumerable: true },
  2795. onselect: { enumerable: true },
  2796. onslotchange: { enumerable: true },
  2797. onstalled: { enumerable: true },
  2798. onsubmit: { enumerable: true },
  2799. onsuspend: { enumerable: true },
  2800. ontimeupdate: { enumerable: true },
  2801. ontoggle: { enumerable: true },
  2802. onvolumechange: { enumerable: true },
  2803. onwaiting: { enumerable: true },
  2804. onwebkitanimationend: { enumerable: true },
  2805. onwebkitanimationiteration: { enumerable: true },
  2806. onwebkitanimationstart: { enumerable: true },
  2807. onwebkittransitionend: { enumerable: true },
  2808. onwheel: { enumerable: true },
  2809. ontouchstart: { enumerable: true },
  2810. ontouchend: { enumerable: true },
  2811. ontouchmove: { enumerable: true },
  2812. ontouchcancel: { enumerable: true },
  2813. onpointerover: { enumerable: true },
  2814. onpointerenter: { enumerable: true },
  2815. onpointerdown: { enumerable: true },
  2816. onpointermove: { enumerable: true },
  2817. onpointerrawupdate: { enumerable: true },
  2818. onpointerup: { enumerable: true },
  2819. onpointercancel: { enumerable: true },
  2820. onpointerout: { enumerable: true },
  2821. onpointerleave: { enumerable: true },
  2822. ongotpointercapture: { enumerable: true },
  2823. onlostpointercapture: { enumerable: true },
  2824. dataset: { enumerable: true },
  2825. nonce: { enumerable: true },
  2826. tabIndex: { enumerable: true },
  2827. [Symbol.toStringTag]: { value: "HTMLElement", configurable: true }
  2828. });
  2829. ctorRegistry[interfaceName] = HTMLElement;
  2830. Object.defineProperty(globalObject, interfaceName, {
  2831. configurable: true,
  2832. writable: true,
  2833. value: HTMLElement
  2834. });
  2835. };
  2836. const Impl = require("../../jsdom/living/nodes/HTMLElement-impl.js");