HTMLFrameSetElement.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711
  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 OnBeforeUnloadEventHandlerNonNull = require("./OnBeforeUnloadEventHandlerNonNull.js");
  12. const implSymbol = utils.implSymbol;
  13. const ctorRegistrySymbol = utils.ctorRegistrySymbol;
  14. const HTMLElement = require("./HTMLElement.js");
  15. const interfaceName = "HTMLFrameSetElement";
  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 'HTMLFrameSetElement'.`);
  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]["HTMLFrameSetElement"].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. HTMLElement._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 HTMLFrameSetElement extends globalObject.HTMLElement {
  82. constructor() {
  83. return HTMLConstructor_jsdom_living_helpers_html_constructor(globalObject, interfaceName, new.target);
  84. }
  85. get cols() {
  86. const esValue = this !== null && this !== undefined ? this : globalObject;
  87. if (!exports.is(esValue)) {
  88. throw new globalObject.TypeError(
  89. "'get cols' called on an object that is not a valid instance of HTMLFrameSetElement."
  90. );
  91. }
  92. ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
  93. try {
  94. const value = esValue[implSymbol]._reflectGetTheContentAttribute("cols");
  95. return value === null ? "" : value;
  96. } finally {
  97. ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
  98. }
  99. }
  100. set cols(V) {
  101. const esValue = this !== null && this !== undefined ? this : globalObject;
  102. if (!exports.is(esValue)) {
  103. throw new globalObject.TypeError(
  104. "'set cols' called on an object that is not a valid instance of HTMLFrameSetElement."
  105. );
  106. }
  107. V = conversions["DOMString"](V, {
  108. context: "Failed to set the 'cols' property on 'HTMLFrameSetElement': The provided value",
  109. globals: globalObject
  110. });
  111. ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
  112. try {
  113. esValue[implSymbol]._reflectSetTheContentAttribute("cols", V);
  114. } finally {
  115. ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
  116. }
  117. }
  118. get rows() {
  119. const esValue = this !== null && this !== undefined ? this : globalObject;
  120. if (!exports.is(esValue)) {
  121. throw new globalObject.TypeError(
  122. "'get rows' called on an object that is not a valid instance of HTMLFrameSetElement."
  123. );
  124. }
  125. ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
  126. try {
  127. const value = esValue[implSymbol]._reflectGetTheContentAttribute("rows");
  128. return value === null ? "" : value;
  129. } finally {
  130. ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
  131. }
  132. }
  133. set rows(V) {
  134. const esValue = this !== null && this !== undefined ? this : globalObject;
  135. if (!exports.is(esValue)) {
  136. throw new globalObject.TypeError(
  137. "'set rows' called on an object that is not a valid instance of HTMLFrameSetElement."
  138. );
  139. }
  140. V = conversions["DOMString"](V, {
  141. context: "Failed to set the 'rows' property on 'HTMLFrameSetElement': The provided value",
  142. globals: globalObject
  143. });
  144. ceReactionsPreSteps_jsdom_living_helpers_custom_elements(globalObject);
  145. try {
  146. esValue[implSymbol]._reflectSetTheContentAttribute("rows", V);
  147. } finally {
  148. ceReactionsPostSteps_jsdom_living_helpers_custom_elements(globalObject);
  149. }
  150. }
  151. get onafterprint() {
  152. const esValue = this !== null && this !== undefined ? this : globalObject;
  153. if (!exports.is(esValue)) {
  154. throw new globalObject.TypeError(
  155. "'get onafterprint' called on an object that is not a valid instance of HTMLFrameSetElement."
  156. );
  157. }
  158. return utils.tryWrapperForImpl(esValue[implSymbol]["onafterprint"]);
  159. }
  160. set onafterprint(V) {
  161. const esValue = this !== null && this !== undefined ? this : globalObject;
  162. if (!exports.is(esValue)) {
  163. throw new globalObject.TypeError(
  164. "'set onafterprint' called on an object that is not a valid instance of HTMLFrameSetElement."
  165. );
  166. }
  167. if (!utils.isObject(V)) {
  168. V = null;
  169. } else {
  170. V = EventHandlerNonNull.convert(globalObject, V, {
  171. context: "Failed to set the 'onafterprint' property on 'HTMLFrameSetElement': The provided value"
  172. });
  173. }
  174. esValue[implSymbol]["onafterprint"] = V;
  175. }
  176. get onbeforeprint() {
  177. const esValue = this !== null && this !== undefined ? this : globalObject;
  178. if (!exports.is(esValue)) {
  179. throw new globalObject.TypeError(
  180. "'get onbeforeprint' called on an object that is not a valid instance of HTMLFrameSetElement."
  181. );
  182. }
  183. return utils.tryWrapperForImpl(esValue[implSymbol]["onbeforeprint"]);
  184. }
  185. set onbeforeprint(V) {
  186. const esValue = this !== null && this !== undefined ? this : globalObject;
  187. if (!exports.is(esValue)) {
  188. throw new globalObject.TypeError(
  189. "'set onbeforeprint' called on an object that is not a valid instance of HTMLFrameSetElement."
  190. );
  191. }
  192. if (!utils.isObject(V)) {
  193. V = null;
  194. } else {
  195. V = EventHandlerNonNull.convert(globalObject, V, {
  196. context: "Failed to set the 'onbeforeprint' property on 'HTMLFrameSetElement': The provided value"
  197. });
  198. }
  199. esValue[implSymbol]["onbeforeprint"] = V;
  200. }
  201. get onbeforeunload() {
  202. const esValue = this !== null && this !== undefined ? this : globalObject;
  203. if (!exports.is(esValue)) {
  204. throw new globalObject.TypeError(
  205. "'get onbeforeunload' called on an object that is not a valid instance of HTMLFrameSetElement."
  206. );
  207. }
  208. return utils.tryWrapperForImpl(esValue[implSymbol]["onbeforeunload"]);
  209. }
  210. set onbeforeunload(V) {
  211. const esValue = this !== null && this !== undefined ? this : globalObject;
  212. if (!exports.is(esValue)) {
  213. throw new globalObject.TypeError(
  214. "'set onbeforeunload' called on an object that is not a valid instance of HTMLFrameSetElement."
  215. );
  216. }
  217. if (!utils.isObject(V)) {
  218. V = null;
  219. } else {
  220. V = OnBeforeUnloadEventHandlerNonNull.convert(globalObject, V, {
  221. context: "Failed to set the 'onbeforeunload' property on 'HTMLFrameSetElement': The provided value"
  222. });
  223. }
  224. esValue[implSymbol]["onbeforeunload"] = V;
  225. }
  226. get onhashchange() {
  227. const esValue = this !== null && this !== undefined ? this : globalObject;
  228. if (!exports.is(esValue)) {
  229. throw new globalObject.TypeError(
  230. "'get onhashchange' called on an object that is not a valid instance of HTMLFrameSetElement."
  231. );
  232. }
  233. return utils.tryWrapperForImpl(esValue[implSymbol]["onhashchange"]);
  234. }
  235. set onhashchange(V) {
  236. const esValue = this !== null && this !== undefined ? this : globalObject;
  237. if (!exports.is(esValue)) {
  238. throw new globalObject.TypeError(
  239. "'set onhashchange' called on an object that is not a valid instance of HTMLFrameSetElement."
  240. );
  241. }
  242. if (!utils.isObject(V)) {
  243. V = null;
  244. } else {
  245. V = EventHandlerNonNull.convert(globalObject, V, {
  246. context: "Failed to set the 'onhashchange' property on 'HTMLFrameSetElement': The provided value"
  247. });
  248. }
  249. esValue[implSymbol]["onhashchange"] = V;
  250. }
  251. get onlanguagechange() {
  252. const esValue = this !== null && this !== undefined ? this : globalObject;
  253. if (!exports.is(esValue)) {
  254. throw new globalObject.TypeError(
  255. "'get onlanguagechange' called on an object that is not a valid instance of HTMLFrameSetElement."
  256. );
  257. }
  258. return utils.tryWrapperForImpl(esValue[implSymbol]["onlanguagechange"]);
  259. }
  260. set onlanguagechange(V) {
  261. const esValue = this !== null && this !== undefined ? this : globalObject;
  262. if (!exports.is(esValue)) {
  263. throw new globalObject.TypeError(
  264. "'set onlanguagechange' called on an object that is not a valid instance of HTMLFrameSetElement."
  265. );
  266. }
  267. if (!utils.isObject(V)) {
  268. V = null;
  269. } else {
  270. V = EventHandlerNonNull.convert(globalObject, V, {
  271. context: "Failed to set the 'onlanguagechange' property on 'HTMLFrameSetElement': The provided value"
  272. });
  273. }
  274. esValue[implSymbol]["onlanguagechange"] = V;
  275. }
  276. get onmessage() {
  277. const esValue = this !== null && this !== undefined ? this : globalObject;
  278. if (!exports.is(esValue)) {
  279. throw new globalObject.TypeError(
  280. "'get onmessage' called on an object that is not a valid instance of HTMLFrameSetElement."
  281. );
  282. }
  283. return utils.tryWrapperForImpl(esValue[implSymbol]["onmessage"]);
  284. }
  285. set onmessage(V) {
  286. const esValue = this !== null && this !== undefined ? this : globalObject;
  287. if (!exports.is(esValue)) {
  288. throw new globalObject.TypeError(
  289. "'set onmessage' called on an object that is not a valid instance of HTMLFrameSetElement."
  290. );
  291. }
  292. if (!utils.isObject(V)) {
  293. V = null;
  294. } else {
  295. V = EventHandlerNonNull.convert(globalObject, V, {
  296. context: "Failed to set the 'onmessage' property on 'HTMLFrameSetElement': The provided value"
  297. });
  298. }
  299. esValue[implSymbol]["onmessage"] = V;
  300. }
  301. get onmessageerror() {
  302. const esValue = this !== null && this !== undefined ? this : globalObject;
  303. if (!exports.is(esValue)) {
  304. throw new globalObject.TypeError(
  305. "'get onmessageerror' called on an object that is not a valid instance of HTMLFrameSetElement."
  306. );
  307. }
  308. return utils.tryWrapperForImpl(esValue[implSymbol]["onmessageerror"]);
  309. }
  310. set onmessageerror(V) {
  311. const esValue = this !== null && this !== undefined ? this : globalObject;
  312. if (!exports.is(esValue)) {
  313. throw new globalObject.TypeError(
  314. "'set onmessageerror' called on an object that is not a valid instance of HTMLFrameSetElement."
  315. );
  316. }
  317. if (!utils.isObject(V)) {
  318. V = null;
  319. } else {
  320. V = EventHandlerNonNull.convert(globalObject, V, {
  321. context: "Failed to set the 'onmessageerror' property on 'HTMLFrameSetElement': The provided value"
  322. });
  323. }
  324. esValue[implSymbol]["onmessageerror"] = V;
  325. }
  326. get onoffline() {
  327. const esValue = this !== null && this !== undefined ? this : globalObject;
  328. if (!exports.is(esValue)) {
  329. throw new globalObject.TypeError(
  330. "'get onoffline' called on an object that is not a valid instance of HTMLFrameSetElement."
  331. );
  332. }
  333. return utils.tryWrapperForImpl(esValue[implSymbol]["onoffline"]);
  334. }
  335. set onoffline(V) {
  336. const esValue = this !== null && this !== undefined ? this : globalObject;
  337. if (!exports.is(esValue)) {
  338. throw new globalObject.TypeError(
  339. "'set onoffline' called on an object that is not a valid instance of HTMLFrameSetElement."
  340. );
  341. }
  342. if (!utils.isObject(V)) {
  343. V = null;
  344. } else {
  345. V = EventHandlerNonNull.convert(globalObject, V, {
  346. context: "Failed to set the 'onoffline' property on 'HTMLFrameSetElement': The provided value"
  347. });
  348. }
  349. esValue[implSymbol]["onoffline"] = V;
  350. }
  351. get ononline() {
  352. const esValue = this !== null && this !== undefined ? this : globalObject;
  353. if (!exports.is(esValue)) {
  354. throw new globalObject.TypeError(
  355. "'get ononline' called on an object that is not a valid instance of HTMLFrameSetElement."
  356. );
  357. }
  358. return utils.tryWrapperForImpl(esValue[implSymbol]["ononline"]);
  359. }
  360. set ononline(V) {
  361. const esValue = this !== null && this !== undefined ? this : globalObject;
  362. if (!exports.is(esValue)) {
  363. throw new globalObject.TypeError(
  364. "'set ononline' called on an object that is not a valid instance of HTMLFrameSetElement."
  365. );
  366. }
  367. if (!utils.isObject(V)) {
  368. V = null;
  369. } else {
  370. V = EventHandlerNonNull.convert(globalObject, V, {
  371. context: "Failed to set the 'ononline' property on 'HTMLFrameSetElement': The provided value"
  372. });
  373. }
  374. esValue[implSymbol]["ononline"] = V;
  375. }
  376. get onpagehide() {
  377. const esValue = this !== null && this !== undefined ? this : globalObject;
  378. if (!exports.is(esValue)) {
  379. throw new globalObject.TypeError(
  380. "'get onpagehide' called on an object that is not a valid instance of HTMLFrameSetElement."
  381. );
  382. }
  383. return utils.tryWrapperForImpl(esValue[implSymbol]["onpagehide"]);
  384. }
  385. set onpagehide(V) {
  386. const esValue = this !== null && this !== undefined ? this : globalObject;
  387. if (!exports.is(esValue)) {
  388. throw new globalObject.TypeError(
  389. "'set onpagehide' called on an object that is not a valid instance of HTMLFrameSetElement."
  390. );
  391. }
  392. if (!utils.isObject(V)) {
  393. V = null;
  394. } else {
  395. V = EventHandlerNonNull.convert(globalObject, V, {
  396. context: "Failed to set the 'onpagehide' property on 'HTMLFrameSetElement': The provided value"
  397. });
  398. }
  399. esValue[implSymbol]["onpagehide"] = V;
  400. }
  401. get onpageshow() {
  402. const esValue = this !== null && this !== undefined ? this : globalObject;
  403. if (!exports.is(esValue)) {
  404. throw new globalObject.TypeError(
  405. "'get onpageshow' called on an object that is not a valid instance of HTMLFrameSetElement."
  406. );
  407. }
  408. return utils.tryWrapperForImpl(esValue[implSymbol]["onpageshow"]);
  409. }
  410. set onpageshow(V) {
  411. const esValue = this !== null && this !== undefined ? this : globalObject;
  412. if (!exports.is(esValue)) {
  413. throw new globalObject.TypeError(
  414. "'set onpageshow' called on an object that is not a valid instance of HTMLFrameSetElement."
  415. );
  416. }
  417. if (!utils.isObject(V)) {
  418. V = null;
  419. } else {
  420. V = EventHandlerNonNull.convert(globalObject, V, {
  421. context: "Failed to set the 'onpageshow' property on 'HTMLFrameSetElement': The provided value"
  422. });
  423. }
  424. esValue[implSymbol]["onpageshow"] = V;
  425. }
  426. get onpopstate() {
  427. const esValue = this !== null && this !== undefined ? this : globalObject;
  428. if (!exports.is(esValue)) {
  429. throw new globalObject.TypeError(
  430. "'get onpopstate' called on an object that is not a valid instance of HTMLFrameSetElement."
  431. );
  432. }
  433. return utils.tryWrapperForImpl(esValue[implSymbol]["onpopstate"]);
  434. }
  435. set onpopstate(V) {
  436. const esValue = this !== null && this !== undefined ? this : globalObject;
  437. if (!exports.is(esValue)) {
  438. throw new globalObject.TypeError(
  439. "'set onpopstate' called on an object that is not a valid instance of HTMLFrameSetElement."
  440. );
  441. }
  442. if (!utils.isObject(V)) {
  443. V = null;
  444. } else {
  445. V = EventHandlerNonNull.convert(globalObject, V, {
  446. context: "Failed to set the 'onpopstate' property on 'HTMLFrameSetElement': The provided value"
  447. });
  448. }
  449. esValue[implSymbol]["onpopstate"] = V;
  450. }
  451. get onrejectionhandled() {
  452. const esValue = this !== null && this !== undefined ? this : globalObject;
  453. if (!exports.is(esValue)) {
  454. throw new globalObject.TypeError(
  455. "'get onrejectionhandled' called on an object that is not a valid instance of HTMLFrameSetElement."
  456. );
  457. }
  458. return utils.tryWrapperForImpl(esValue[implSymbol]["onrejectionhandled"]);
  459. }
  460. set onrejectionhandled(V) {
  461. const esValue = this !== null && this !== undefined ? this : globalObject;
  462. if (!exports.is(esValue)) {
  463. throw new globalObject.TypeError(
  464. "'set onrejectionhandled' called on an object that is not a valid instance of HTMLFrameSetElement."
  465. );
  466. }
  467. if (!utils.isObject(V)) {
  468. V = null;
  469. } else {
  470. V = EventHandlerNonNull.convert(globalObject, V, {
  471. context: "Failed to set the 'onrejectionhandled' property on 'HTMLFrameSetElement': The provided value"
  472. });
  473. }
  474. esValue[implSymbol]["onrejectionhandled"] = V;
  475. }
  476. get onstorage() {
  477. const esValue = this !== null && this !== undefined ? this : globalObject;
  478. if (!exports.is(esValue)) {
  479. throw new globalObject.TypeError(
  480. "'get onstorage' called on an object that is not a valid instance of HTMLFrameSetElement."
  481. );
  482. }
  483. return utils.tryWrapperForImpl(esValue[implSymbol]["onstorage"]);
  484. }
  485. set onstorage(V) {
  486. const esValue = this !== null && this !== undefined ? this : globalObject;
  487. if (!exports.is(esValue)) {
  488. throw new globalObject.TypeError(
  489. "'set onstorage' called on an object that is not a valid instance of HTMLFrameSetElement."
  490. );
  491. }
  492. if (!utils.isObject(V)) {
  493. V = null;
  494. } else {
  495. V = EventHandlerNonNull.convert(globalObject, V, {
  496. context: "Failed to set the 'onstorage' property on 'HTMLFrameSetElement': The provided value"
  497. });
  498. }
  499. esValue[implSymbol]["onstorage"] = V;
  500. }
  501. get onunhandledrejection() {
  502. const esValue = this !== null && this !== undefined ? this : globalObject;
  503. if (!exports.is(esValue)) {
  504. throw new globalObject.TypeError(
  505. "'get onunhandledrejection' called on an object that is not a valid instance of HTMLFrameSetElement."
  506. );
  507. }
  508. return utils.tryWrapperForImpl(esValue[implSymbol]["onunhandledrejection"]);
  509. }
  510. set onunhandledrejection(V) {
  511. const esValue = this !== null && this !== undefined ? this : globalObject;
  512. if (!exports.is(esValue)) {
  513. throw new globalObject.TypeError(
  514. "'set onunhandledrejection' called on an object that is not a valid instance of HTMLFrameSetElement."
  515. );
  516. }
  517. if (!utils.isObject(V)) {
  518. V = null;
  519. } else {
  520. V = EventHandlerNonNull.convert(globalObject, V, {
  521. context: "Failed to set the 'onunhandledrejection' property on 'HTMLFrameSetElement': The provided value"
  522. });
  523. }
  524. esValue[implSymbol]["onunhandledrejection"] = V;
  525. }
  526. get onunload() {
  527. const esValue = this !== null && this !== undefined ? this : globalObject;
  528. if (!exports.is(esValue)) {
  529. throw new globalObject.TypeError(
  530. "'get onunload' called on an object that is not a valid instance of HTMLFrameSetElement."
  531. );
  532. }
  533. return utils.tryWrapperForImpl(esValue[implSymbol]["onunload"]);
  534. }
  535. set onunload(V) {
  536. const esValue = this !== null && this !== undefined ? this : globalObject;
  537. if (!exports.is(esValue)) {
  538. throw new globalObject.TypeError(
  539. "'set onunload' called on an object that is not a valid instance of HTMLFrameSetElement."
  540. );
  541. }
  542. if (!utils.isObject(V)) {
  543. V = null;
  544. } else {
  545. V = EventHandlerNonNull.convert(globalObject, V, {
  546. context: "Failed to set the 'onunload' property on 'HTMLFrameSetElement': The provided value"
  547. });
  548. }
  549. esValue[implSymbol]["onunload"] = V;
  550. }
  551. }
  552. Object.defineProperties(HTMLFrameSetElement.prototype, {
  553. cols: { enumerable: true },
  554. rows: { enumerable: true },
  555. onafterprint: { enumerable: true },
  556. onbeforeprint: { enumerable: true },
  557. onbeforeunload: { enumerable: true },
  558. onhashchange: { enumerable: true },
  559. onlanguagechange: { enumerable: true },
  560. onmessage: { enumerable: true },
  561. onmessageerror: { enumerable: true },
  562. onoffline: { enumerable: true },
  563. ononline: { enumerable: true },
  564. onpagehide: { enumerable: true },
  565. onpageshow: { enumerable: true },
  566. onpopstate: { enumerable: true },
  567. onrejectionhandled: { enumerable: true },
  568. onstorage: { enumerable: true },
  569. onunhandledrejection: { enumerable: true },
  570. onunload: { enumerable: true },
  571. [Symbol.toStringTag]: { value: "HTMLFrameSetElement", configurable: true }
  572. });
  573. ctorRegistry[interfaceName] = HTMLFrameSetElement;
  574. Object.defineProperty(globalObject, interfaceName, {
  575. configurable: true,
  576. writable: true,
  577. value: HTMLFrameSetElement
  578. });
  579. };
  580. const Impl = require("../../jsdom/living/nodes/HTMLFrameSetElement-impl.js");