HTMLTableCellElement.js 24 KB

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