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