import HTMLTableElement from 'html-document/src/HTMLElement/elements/HTMLTableElement.js'
HTMLTableElement
Extends:
<table> element.
Member Summary
Public Members | ||
public get |
Is an HTMLTableCaptionElement representing the first <caption> that is a child of the element, or null if none is found. |
|
public get |
rows: HTMLElement[] Returns a live HTMLCollection containing all the rows of the element, that is all <tr> that are a child of the element, or a child or one of its <thead>, <tbody> and <tfoot> children. |
|
public get |
Returns a live HTMLCollection containing all the <tbody> of the element. |
|
public get |
tFoot: HTMLElement | null Is an HTMLTableSectionElement representing the first <tfoot> that is a child of the element, or null if none is found. |
|
public get |
Is an HTMLTableSectionElement representing the first <thead> that is a child of the element, or null if none is found. |
Method Summary
Public Methods | ||
public |
appendChild(element: *): * |
|
public |
Returns an HTMLElement representing the first <caption> that is a child of the element. |
|
public |
Returns an HTMLElement representing the first <tfoot> that is a child of the element. |
|
public |
Returns an HTMLElement representing the first <thead> that is a child of the element. |
|
public |
Removes the first <caption> that is a child of the element. |
|
public |
Removes the first <tfoot> that is a child of the element. |
|
public |
Removes the first <thead> that is a child of the element. |
|
public |
insertRow(index: number): HTMLElement Returns an HTMLElement representing a new row of the table. |
Inherited Summary
From class Node | ||
public get |
|
|
public set |
nodeValue(value: *): * |
|
public get |
Returns the Document that this node belongs to. |
|
public get |
|
|
public |
addEventListener(eventType: string, listener: function, capturingPhase: boolean): * |
|
public |
dispatchEvent(event: Event): boolean |
|
public |
getAttribute(attributeName: string): string get attribute's value |
|
public |
hasAttribute(attributeName: string): boolean checks if attribute exists for node |
|
public |
removeAttribute(attributeName: string) remove attribute |
|
public |
removeEventListener(eventType: string, listener: function, capturingPhase: boolean): boolean |
|
public |
setAttribute(attributeName: string, attributeValue: string) set attribute's value |
From class ParentNode | ||
public get |
childNodes: Node[] TODO return {HTMLCollection} |
|
public get |
firstChild: Node | null |
|
public get |
|
|
public get |
nextSibling: Node | null |
|
public get |
parentNode: Node | null |
|
public get |
|
|
public |
appendChild(child: Node): Node |
|
public |
Clone a Node, and optionally, all of its contents. |
|
public |
Method returns true if node has child nodes. |
|
public |
insertBefore(child: Node, existingChild: Node): Node |
|
public |
removeChild(toRemoveChild: Node): Node |
|
public |
replaceChild(newChild: Node, oldChild: Node): Node |
|
protected |
_createCollection(selector: *): * Inner method to create new live HTMLCollection. |
From class Element | ||
public get |
attributes: * |
|
public get |
Returns an unsigned long giving the amount of children that the object has. |
|
public get |
Returns a live HTMLCollection containing all objects of type Element that are children of this ParentNode. |
|
public get |
Returns the Element that is the first child of this ParentNode, or null if there is none. |
|
public get |
The id of the element. |
|
public set |
|
|
public get |
Returns the Element that is the first child of this ParentNode, or null if there is none. |
|
public get |
Returns the Element immediately following the specified one in its parent's children list, or null if the specified element is the last one in the list. |
|
public get |
Returns the Element immediately prior to the specified one in its parent's children list, or null if the specified element is the first one in the list. |
|
public get |
The tag name of the element. |
|
public |
getElementById(id: string): Element Returns a reference to the element by its ID. |
|
public |
getElementsByClassName(names: string): HTMLCollection The Element.getElementsByClassName() method returns a live HTMLCollection containing all child elements which have all of the given class names. |
|
public |
getElementsByTagName(tagName: string): HTMLCollection Returns an HTMLCollection of elements with the given tag name. |
|
public |
querySelector(query: string): Element | null Returns the first element that is a descendant of the element on which it is invoked that matches the specified group of selectors. |
|
public |
querySelectorAll(query: string): Element[] Returns a non-live NodeList of all elements descended from the element on which it is invoked that match the specified group of CSS selectors. |
From class HTMLElement | ||
public get |
The class of the element. |
|
public set |
|
|
public get |
dataset: * |
|
public |
returns a token list of the class attribute of the element |
|
public |
returns a token list of the class attribute of the element |
Public Members
public get caption: HTMLTableCaptionElement | null source
Is an HTMLTableCaptionElement representing the first <caption> that is a child of the element, or null if none is found. When set, if the object doesn't represent a <caption>, a DOMException with the HierarchyRequestError name is thrown. If a correct object is given, it is inserted in the tree as the first child of this element and the first <caption> that is a child of this element is removed from the tree, if any.
public get rows: HTMLElement[] source
Returns a live HTMLCollection containing all the rows of the element, that is all <tr> that are a child of the element, or a child or one of its <thead>, <tbody> and <tfoot> children. The rows members of a <thead> appear first, in tree order, and those members of a <tbody> last, also in tree order. The HTMLCollection is live and is automatically updated when the HTMLTableElement changes.
public get tBodies: HTMLElement[] source
Returns a live HTMLCollection containing all the <tbody> of the element. The HTMLCollection is live and is automatically updated when the HTMLTableElement changes.
public get tFoot: HTMLElement | null source
Is an HTMLTableSectionElement representing the first <tfoot> that is a child of the element, or null if none is found. When set, if the object doesn't represent a <tfoot>, a DOMException with the HierarchyRequestError name is thrown. If a correct object is given, it is inserted in the tree immediately before the first element that is neither a <caption>, a <colgroup>, nor a <thead>, or as the last child if there is no such element, and the first <tfoot> that is a child of this element is removed from the tree, if any.
public get tHead: HTMLTableSectionElement | null source
Is an HTMLTableSectionElement representing the first <thead> that is a child of the element, or null if none is found. When set, if the object doesn't represent a <thead>, a DOMException with the HierarchyRequestError name is thrown. If a correct object is given, it is inserted in the tree immediately before the first element that is neither a <caption>, nor a <colgroup>, or as the last child if there is no such element, and the first <thead> that is a child of this element is removed from the tree, if any.
Public Methods
public appendChild(element: *): * source
Override:
ParentNode#appendChildParams:
Name | Type | Attribute | Description |
element | * |
Return:
* |
public createCaption(): HTMLElement source
Returns an HTMLElement representing the first <caption> that is a child of the element. If none is found, a new one is created and inserted in the tree as the first child of the <table> element.
public createTFoot(): HTMLElement source
Returns an HTMLElement representing the first <tfoot> that is a child of the element. If none is found, a new one is created and inserted in the tree immediately before the first element that is neither a <caption>, a <colgroup>, nor a <thead>, or as the last child if there is no such element.
public createTHead(): HTMLElement source
Returns an HTMLElement representing the first <thead> that is a child of the element. If none is found, a new one is created and inserted in the tree immediately before the first element that is neither a <caption>, nor a <colgroup>, or as the last child if there is no such element.
public insertRow(index: number): HTMLElement source
Returns an HTMLElement representing a new row of the table. It inserts it in the rows collection immediately before the <tr> element at the given index position. If necessary a <tbody> is created. If the index is -1, the new row is appended to the collection. If the index is smaller than -1 or greater than the number of rows in the collection, a DOMException with the value IndexSizeError is raised.
Params:
Name | Type | Attribute | Description |
index | number |
|