/ cloudformation-templates / node_modules / jsdom / lib / jsdom / living / generated / HTMLTableCellElement.js
HTMLTableCellElement.js
1 "use strict"; 2 3 const conversions = require("webidl-conversions"); 4 const utils = require("./utils.js"); 5 6 const HTMLConstructor_helpers_html_constructor = require("../helpers/html-constructor.js").HTMLConstructor; 7 const ceReactionsPreSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPreSteps; 8 const ceReactionsPostSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPostSteps; 9 const implSymbol = utils.implSymbol; 10 const ctorRegistrySymbol = utils.ctorRegistrySymbol; 11 const HTMLElement = require("./HTMLElement.js"); 12 13 const interfaceName = "HTMLTableCellElement"; 14 15 exports.is = value => { 16 return utils.isObject(value) && utils.hasOwn(value, implSymbol) && value[implSymbol] instanceof Impl.implementation; 17 }; 18 exports.isImpl = value => { 19 return utils.isObject(value) && value instanceof Impl.implementation; 20 }; 21 exports.convert = (value, { context = "The provided value" } = {}) => { 22 if (exports.is(value)) { 23 return utils.implForWrapper(value); 24 } 25 throw new TypeError(`${context} is not of type 'HTMLTableCellElement'.`); 26 }; 27 28 function makeWrapper(globalObject) { 29 if (globalObject[ctorRegistrySymbol] === undefined) { 30 throw new Error("Internal error: invalid global object"); 31 } 32 33 const ctor = globalObject[ctorRegistrySymbol]["HTMLTableCellElement"]; 34 if (ctor === undefined) { 35 throw new Error("Internal error: constructor HTMLTableCellElement is not installed on the passed global object"); 36 } 37 38 return Object.create(ctor.prototype); 39 } 40 41 exports.create = (globalObject, constructorArgs, privateData) => { 42 const wrapper = makeWrapper(globalObject); 43 return exports.setup(wrapper, globalObject, constructorArgs, privateData); 44 }; 45 46 exports.createImpl = (globalObject, constructorArgs, privateData) => { 47 const wrapper = exports.create(globalObject, constructorArgs, privateData); 48 return utils.implForWrapper(wrapper); 49 }; 50 51 exports._internalSetup = (wrapper, globalObject) => { 52 HTMLElement._internalSetup(wrapper, globalObject); 53 }; 54 55 exports.setup = (wrapper, globalObject, constructorArgs = [], privateData = {}) => { 56 privateData.wrapper = wrapper; 57 58 exports._internalSetup(wrapper, globalObject); 59 Object.defineProperty(wrapper, implSymbol, { 60 value: new Impl.implementation(globalObject, constructorArgs, privateData), 61 configurable: true 62 }); 63 64 wrapper[implSymbol][utils.wrapperSymbol] = wrapper; 65 if (Impl.init) { 66 Impl.init(wrapper[implSymbol]); 67 } 68 return wrapper; 69 }; 70 71 exports.new = globalObject => { 72 const wrapper = makeWrapper(globalObject); 73 74 exports._internalSetup(wrapper, globalObject); 75 Object.defineProperty(wrapper, implSymbol, { 76 value: Object.create(Impl.implementation.prototype), 77 configurable: true 78 }); 79 80 wrapper[implSymbol][utils.wrapperSymbol] = wrapper; 81 if (Impl.init) { 82 Impl.init(wrapper[implSymbol]); 83 } 84 return wrapper[implSymbol]; 85 }; 86 87 const exposed = new Set(["Window"]); 88 89 exports.install = (globalObject, globalNames) => { 90 if (!globalNames.some(globalName => exposed.has(globalName))) { 91 return; 92 } 93 94 if (globalObject.HTMLElement === undefined) { 95 throw new Error("Internal error: attempting to evaluate HTMLTableCellElement before HTMLElement"); 96 } 97 class HTMLTableCellElement extends globalObject.HTMLElement { 98 constructor() { 99 return HTMLConstructor_helpers_html_constructor(globalObject, interfaceName, new.target); 100 } 101 102 get colSpan() { 103 const esValue = this !== null && this !== undefined ? this : globalObject; 104 105 if (!exports.is(esValue)) { 106 throw new TypeError("'get colSpan' called on an object that is not a valid instance of HTMLTableCellElement."); 107 } 108 109 ceReactionsPreSteps_helpers_custom_elements(globalObject); 110 try { 111 return esValue[implSymbol]["colSpan"]; 112 } finally { 113 ceReactionsPostSteps_helpers_custom_elements(globalObject); 114 } 115 } 116 117 set colSpan(V) { 118 const esValue = this !== null && this !== undefined ? this : globalObject; 119 120 if (!exports.is(esValue)) { 121 throw new TypeError("'set colSpan' called on an object that is not a valid instance of HTMLTableCellElement."); 122 } 123 124 V = conversions["unsigned long"](V, { 125 context: "Failed to set the 'colSpan' property on 'HTMLTableCellElement': The provided value" 126 }); 127 128 ceReactionsPreSteps_helpers_custom_elements(globalObject); 129 try { 130 esValue[implSymbol]["colSpan"] = V; 131 } finally { 132 ceReactionsPostSteps_helpers_custom_elements(globalObject); 133 } 134 } 135 136 get rowSpan() { 137 const esValue = this !== null && this !== undefined ? this : globalObject; 138 139 if (!exports.is(esValue)) { 140 throw new TypeError("'get rowSpan' called on an object that is not a valid instance of HTMLTableCellElement."); 141 } 142 143 ceReactionsPreSteps_helpers_custom_elements(globalObject); 144 try { 145 return esValue[implSymbol]["rowSpan"]; 146 } finally { 147 ceReactionsPostSteps_helpers_custom_elements(globalObject); 148 } 149 } 150 151 set rowSpan(V) { 152 const esValue = this !== null && this !== undefined ? this : globalObject; 153 154 if (!exports.is(esValue)) { 155 throw new TypeError("'set rowSpan' called on an object that is not a valid instance of HTMLTableCellElement."); 156 } 157 158 V = conversions["unsigned long"](V, { 159 context: "Failed to set the 'rowSpan' property on 'HTMLTableCellElement': The provided value" 160 }); 161 162 ceReactionsPreSteps_helpers_custom_elements(globalObject); 163 try { 164 esValue[implSymbol]["rowSpan"] = V; 165 } finally { 166 ceReactionsPostSteps_helpers_custom_elements(globalObject); 167 } 168 } 169 170 get headers() { 171 const esValue = this !== null && this !== undefined ? this : globalObject; 172 173 if (!exports.is(esValue)) { 174 throw new TypeError("'get headers' called on an object that is not a valid instance of HTMLTableCellElement."); 175 } 176 177 ceReactionsPreSteps_helpers_custom_elements(globalObject); 178 try { 179 const value = esValue[implSymbol].getAttributeNS(null, "headers"); 180 return value === null ? "" : value; 181 } finally { 182 ceReactionsPostSteps_helpers_custom_elements(globalObject); 183 } 184 } 185 186 set headers(V) { 187 const esValue = this !== null && this !== undefined ? this : globalObject; 188 189 if (!exports.is(esValue)) { 190 throw new TypeError("'set headers' called on an object that is not a valid instance of HTMLTableCellElement."); 191 } 192 193 V = conversions["DOMString"](V, { 194 context: "Failed to set the 'headers' property on 'HTMLTableCellElement': The provided value" 195 }); 196 197 ceReactionsPreSteps_helpers_custom_elements(globalObject); 198 try { 199 esValue[implSymbol].setAttributeNS(null, "headers", V); 200 } finally { 201 ceReactionsPostSteps_helpers_custom_elements(globalObject); 202 } 203 } 204 205 get cellIndex() { 206 const esValue = this !== null && this !== undefined ? this : globalObject; 207 208 if (!exports.is(esValue)) { 209 throw new TypeError( 210 "'get cellIndex' called on an object that is not a valid instance of HTMLTableCellElement." 211 ); 212 } 213 214 return esValue[implSymbol]["cellIndex"]; 215 } 216 217 get scope() { 218 const esValue = this !== null && this !== undefined ? this : globalObject; 219 220 if (!exports.is(esValue)) { 221 throw new TypeError("'get scope' called on an object that is not a valid instance of HTMLTableCellElement."); 222 } 223 224 ceReactionsPreSteps_helpers_custom_elements(globalObject); 225 try { 226 return esValue[implSymbol]["scope"]; 227 } finally { 228 ceReactionsPostSteps_helpers_custom_elements(globalObject); 229 } 230 } 231 232 set scope(V) { 233 const esValue = this !== null && this !== undefined ? this : globalObject; 234 235 if (!exports.is(esValue)) { 236 throw new TypeError("'set scope' called on an object that is not a valid instance of HTMLTableCellElement."); 237 } 238 239 V = conversions["DOMString"](V, { 240 context: "Failed to set the 'scope' property on 'HTMLTableCellElement': The provided value" 241 }); 242 243 ceReactionsPreSteps_helpers_custom_elements(globalObject); 244 try { 245 esValue[implSymbol]["scope"] = V; 246 } finally { 247 ceReactionsPostSteps_helpers_custom_elements(globalObject); 248 } 249 } 250 251 get abbr() { 252 const esValue = this !== null && this !== undefined ? this : globalObject; 253 254 if (!exports.is(esValue)) { 255 throw new TypeError("'get abbr' called on an object that is not a valid instance of HTMLTableCellElement."); 256 } 257 258 ceReactionsPreSteps_helpers_custom_elements(globalObject); 259 try { 260 const value = esValue[implSymbol].getAttributeNS(null, "abbr"); 261 return value === null ? "" : value; 262 } finally { 263 ceReactionsPostSteps_helpers_custom_elements(globalObject); 264 } 265 } 266 267 set abbr(V) { 268 const esValue = this !== null && this !== undefined ? this : globalObject; 269 270 if (!exports.is(esValue)) { 271 throw new TypeError("'set abbr' called on an object that is not a valid instance of HTMLTableCellElement."); 272 } 273 274 V = conversions["DOMString"](V, { 275 context: "Failed to set the 'abbr' property on 'HTMLTableCellElement': The provided value" 276 }); 277 278 ceReactionsPreSteps_helpers_custom_elements(globalObject); 279 try { 280 esValue[implSymbol].setAttributeNS(null, "abbr", V); 281 } finally { 282 ceReactionsPostSteps_helpers_custom_elements(globalObject); 283 } 284 } 285 286 get align() { 287 const esValue = this !== null && this !== undefined ? this : globalObject; 288 289 if (!exports.is(esValue)) { 290 throw new TypeError("'get align' called on an object that is not a valid instance of HTMLTableCellElement."); 291 } 292 293 ceReactionsPreSteps_helpers_custom_elements(globalObject); 294 try { 295 const value = esValue[implSymbol].getAttributeNS(null, "align"); 296 return value === null ? "" : value; 297 } finally { 298 ceReactionsPostSteps_helpers_custom_elements(globalObject); 299 } 300 } 301 302 set align(V) { 303 const esValue = this !== null && this !== undefined ? this : globalObject; 304 305 if (!exports.is(esValue)) { 306 throw new TypeError("'set align' called on an object that is not a valid instance of HTMLTableCellElement."); 307 } 308 309 V = conversions["DOMString"](V, { 310 context: "Failed to set the 'align' property on 'HTMLTableCellElement': The provided value" 311 }); 312 313 ceReactionsPreSteps_helpers_custom_elements(globalObject); 314 try { 315 esValue[implSymbol].setAttributeNS(null, "align", V); 316 } finally { 317 ceReactionsPostSteps_helpers_custom_elements(globalObject); 318 } 319 } 320 321 get axis() { 322 const esValue = this !== null && this !== undefined ? this : globalObject; 323 324 if (!exports.is(esValue)) { 325 throw new TypeError("'get axis' called on an object that is not a valid instance of HTMLTableCellElement."); 326 } 327 328 ceReactionsPreSteps_helpers_custom_elements(globalObject); 329 try { 330 const value = esValue[implSymbol].getAttributeNS(null, "axis"); 331 return value === null ? "" : value; 332 } finally { 333 ceReactionsPostSteps_helpers_custom_elements(globalObject); 334 } 335 } 336 337 set axis(V) { 338 const esValue = this !== null && this !== undefined ? this : globalObject; 339 340 if (!exports.is(esValue)) { 341 throw new TypeError("'set axis' called on an object that is not a valid instance of HTMLTableCellElement."); 342 } 343 344 V = conversions["DOMString"](V, { 345 context: "Failed to set the 'axis' property on 'HTMLTableCellElement': The provided value" 346 }); 347 348 ceReactionsPreSteps_helpers_custom_elements(globalObject); 349 try { 350 esValue[implSymbol].setAttributeNS(null, "axis", V); 351 } finally { 352 ceReactionsPostSteps_helpers_custom_elements(globalObject); 353 } 354 } 355 356 get height() { 357 const esValue = this !== null && this !== undefined ? this : globalObject; 358 359 if (!exports.is(esValue)) { 360 throw new TypeError("'get height' called on an object that is not a valid instance of HTMLTableCellElement."); 361 } 362 363 ceReactionsPreSteps_helpers_custom_elements(globalObject); 364 try { 365 const value = esValue[implSymbol].getAttributeNS(null, "height"); 366 return value === null ? "" : value; 367 } finally { 368 ceReactionsPostSteps_helpers_custom_elements(globalObject); 369 } 370 } 371 372 set height(V) { 373 const esValue = this !== null && this !== undefined ? this : globalObject; 374 375 if (!exports.is(esValue)) { 376 throw new TypeError("'set height' called on an object that is not a valid instance of HTMLTableCellElement."); 377 } 378 379 V = conversions["DOMString"](V, { 380 context: "Failed to set the 'height' property on 'HTMLTableCellElement': The provided value" 381 }); 382 383 ceReactionsPreSteps_helpers_custom_elements(globalObject); 384 try { 385 esValue[implSymbol].setAttributeNS(null, "height", V); 386 } finally { 387 ceReactionsPostSteps_helpers_custom_elements(globalObject); 388 } 389 } 390 391 get width() { 392 const esValue = this !== null && this !== undefined ? this : globalObject; 393 394 if (!exports.is(esValue)) { 395 throw new TypeError("'get width' called on an object that is not a valid instance of HTMLTableCellElement."); 396 } 397 398 ceReactionsPreSteps_helpers_custom_elements(globalObject); 399 try { 400 const value = esValue[implSymbol].getAttributeNS(null, "width"); 401 return value === null ? "" : value; 402 } finally { 403 ceReactionsPostSteps_helpers_custom_elements(globalObject); 404 } 405 } 406 407 set width(V) { 408 const esValue = this !== null && this !== undefined ? this : globalObject; 409 410 if (!exports.is(esValue)) { 411 throw new TypeError("'set width' called on an object that is not a valid instance of HTMLTableCellElement."); 412 } 413 414 V = conversions["DOMString"](V, { 415 context: "Failed to set the 'width' property on 'HTMLTableCellElement': The provided value" 416 }); 417 418 ceReactionsPreSteps_helpers_custom_elements(globalObject); 419 try { 420 esValue[implSymbol].setAttributeNS(null, "width", V); 421 } finally { 422 ceReactionsPostSteps_helpers_custom_elements(globalObject); 423 } 424 } 425 426 get ch() { 427 const esValue = this !== null && this !== undefined ? this : globalObject; 428 429 if (!exports.is(esValue)) { 430 throw new TypeError("'get ch' called on an object that is not a valid instance of HTMLTableCellElement."); 431 } 432 433 ceReactionsPreSteps_helpers_custom_elements(globalObject); 434 try { 435 const value = esValue[implSymbol].getAttributeNS(null, "char"); 436 return value === null ? "" : value; 437 } finally { 438 ceReactionsPostSteps_helpers_custom_elements(globalObject); 439 } 440 } 441 442 set ch(V) { 443 const esValue = this !== null && this !== undefined ? this : globalObject; 444 445 if (!exports.is(esValue)) { 446 throw new TypeError("'set ch' called on an object that is not a valid instance of HTMLTableCellElement."); 447 } 448 449 V = conversions["DOMString"](V, { 450 context: "Failed to set the 'ch' property on 'HTMLTableCellElement': The provided value" 451 }); 452 453 ceReactionsPreSteps_helpers_custom_elements(globalObject); 454 try { 455 esValue[implSymbol].setAttributeNS(null, "char", V); 456 } finally { 457 ceReactionsPostSteps_helpers_custom_elements(globalObject); 458 } 459 } 460 461 get chOff() { 462 const esValue = this !== null && this !== undefined ? this : globalObject; 463 464 if (!exports.is(esValue)) { 465 throw new TypeError("'get chOff' called on an object that is not a valid instance of HTMLTableCellElement."); 466 } 467 468 ceReactionsPreSteps_helpers_custom_elements(globalObject); 469 try { 470 const value = esValue[implSymbol].getAttributeNS(null, "charoff"); 471 return value === null ? "" : value; 472 } finally { 473 ceReactionsPostSteps_helpers_custom_elements(globalObject); 474 } 475 } 476 477 set chOff(V) { 478 const esValue = this !== null && this !== undefined ? this : globalObject; 479 480 if (!exports.is(esValue)) { 481 throw new TypeError("'set chOff' called on an object that is not a valid instance of HTMLTableCellElement."); 482 } 483 484 V = conversions["DOMString"](V, { 485 context: "Failed to set the 'chOff' property on 'HTMLTableCellElement': The provided value" 486 }); 487 488 ceReactionsPreSteps_helpers_custom_elements(globalObject); 489 try { 490 esValue[implSymbol].setAttributeNS(null, "charoff", V); 491 } finally { 492 ceReactionsPostSteps_helpers_custom_elements(globalObject); 493 } 494 } 495 496 get noWrap() { 497 const esValue = this !== null && this !== undefined ? this : globalObject; 498 499 if (!exports.is(esValue)) { 500 throw new TypeError("'get noWrap' called on an object that is not a valid instance of HTMLTableCellElement."); 501 } 502 503 ceReactionsPreSteps_helpers_custom_elements(globalObject); 504 try { 505 return esValue[implSymbol].hasAttributeNS(null, "nowrap"); 506 } finally { 507 ceReactionsPostSteps_helpers_custom_elements(globalObject); 508 } 509 } 510 511 set noWrap(V) { 512 const esValue = this !== null && this !== undefined ? this : globalObject; 513 514 if (!exports.is(esValue)) { 515 throw new TypeError("'set noWrap' called on an object that is not a valid instance of HTMLTableCellElement."); 516 } 517 518 V = conversions["boolean"](V, { 519 context: "Failed to set the 'noWrap' property on 'HTMLTableCellElement': The provided value" 520 }); 521 522 ceReactionsPreSteps_helpers_custom_elements(globalObject); 523 try { 524 if (V) { 525 esValue[implSymbol].setAttributeNS(null, "nowrap", ""); 526 } else { 527 esValue[implSymbol].removeAttributeNS(null, "nowrap"); 528 } 529 } finally { 530 ceReactionsPostSteps_helpers_custom_elements(globalObject); 531 } 532 } 533 534 get vAlign() { 535 const esValue = this !== null && this !== undefined ? this : globalObject; 536 537 if (!exports.is(esValue)) { 538 throw new TypeError("'get vAlign' called on an object that is not a valid instance of HTMLTableCellElement."); 539 } 540 541 ceReactionsPreSteps_helpers_custom_elements(globalObject); 542 try { 543 const value = esValue[implSymbol].getAttributeNS(null, "valign"); 544 return value === null ? "" : value; 545 } finally { 546 ceReactionsPostSteps_helpers_custom_elements(globalObject); 547 } 548 } 549 550 set vAlign(V) { 551 const esValue = this !== null && this !== undefined ? this : globalObject; 552 553 if (!exports.is(esValue)) { 554 throw new TypeError("'set vAlign' called on an object that is not a valid instance of HTMLTableCellElement."); 555 } 556 557 V = conversions["DOMString"](V, { 558 context: "Failed to set the 'vAlign' property on 'HTMLTableCellElement': The provided value" 559 }); 560 561 ceReactionsPreSteps_helpers_custom_elements(globalObject); 562 try { 563 esValue[implSymbol].setAttributeNS(null, "valign", V); 564 } finally { 565 ceReactionsPostSteps_helpers_custom_elements(globalObject); 566 } 567 } 568 569 get bgColor() { 570 const esValue = this !== null && this !== undefined ? this : globalObject; 571 572 if (!exports.is(esValue)) { 573 throw new TypeError("'get bgColor' called on an object that is not a valid instance of HTMLTableCellElement."); 574 } 575 576 ceReactionsPreSteps_helpers_custom_elements(globalObject); 577 try { 578 const value = esValue[implSymbol].getAttributeNS(null, "bgcolor"); 579 return value === null ? "" : value; 580 } finally { 581 ceReactionsPostSteps_helpers_custom_elements(globalObject); 582 } 583 } 584 585 set bgColor(V) { 586 const esValue = this !== null && this !== undefined ? this : globalObject; 587 588 if (!exports.is(esValue)) { 589 throw new TypeError("'set bgColor' called on an object that is not a valid instance of HTMLTableCellElement."); 590 } 591 592 V = conversions["DOMString"](V, { 593 context: "Failed to set the 'bgColor' property on 'HTMLTableCellElement': The provided value", 594 treatNullAsEmptyString: true 595 }); 596 597 ceReactionsPreSteps_helpers_custom_elements(globalObject); 598 try { 599 esValue[implSymbol].setAttributeNS(null, "bgcolor", V); 600 } finally { 601 ceReactionsPostSteps_helpers_custom_elements(globalObject); 602 } 603 } 604 } 605 Object.defineProperties(HTMLTableCellElement.prototype, { 606 colSpan: { enumerable: true }, 607 rowSpan: { enumerable: true }, 608 headers: { enumerable: true }, 609 cellIndex: { enumerable: true }, 610 scope: { enumerable: true }, 611 abbr: { enumerable: true }, 612 align: { enumerable: true }, 613 axis: { enumerable: true }, 614 height: { enumerable: true }, 615 width: { enumerable: true }, 616 ch: { enumerable: true }, 617 chOff: { enumerable: true }, 618 noWrap: { enumerable: true }, 619 vAlign: { enumerable: true }, 620 bgColor: { enumerable: true }, 621 [Symbol.toStringTag]: { value: "HTMLTableCellElement", configurable: true } 622 }); 623 if (globalObject[ctorRegistrySymbol] === undefined) { 624 globalObject[ctorRegistrySymbol] = Object.create(null); 625 } 626 globalObject[ctorRegistrySymbol][interfaceName] = HTMLTableCellElement; 627 628 Object.defineProperty(globalObject, interfaceName, { 629 configurable: true, 630 writable: true, 631 value: HTMLTableCellElement 632 }); 633 }; 634 635 const Impl = require("../nodes/HTMLTableCellElement-impl.js");