An object which represents the children of an element as a list. A list has a an array-like mutation API with a few extra methods.

Example

import { ArrayList } from 'deleight/lists/array';
import { ElementList } from 'deleight/lists/element';
const array = [], tbody = document.querySelector('tbody');
const TBodyElementList = class extends ElementList {
render(item) {
const el = document.createElement('p');
el.textContent = item;
}
}, lists = [new ArrayList(array), new TBodyElementList(tbody)];
for (let list of lists) list.push(1, 2, 3, 4, 5);

Constructors

Properties

count: number
element: Element
renderer?: IRenderFunction

Accessors

Methods

  • Parameters

    • index: number

    Returns Generator<Element, void, unknown>

  • Parameters

    • start: number
    • Optional deleteCount: number
    • Rest ...items: any[]

    Returns Element[]