register

  • function
 

Registers a nodeList.

nodeLists.register(nodeList, unregistered, parent)

Registers a nodeList.

Parameters

  1. nodeList {Array<HTMLElement>}

    An array of elements. This array will be kept live if child nodeLists update themselves.

  2. unregistered {function()}Optional

    An optional callback that is called when the nodeList is replaced due to a parentNode list being updated.

  3. parent {Array<HTMLElement>}Optional

    An optional parent nodeList. If no parentNode list is found, the first element in nodeList's current nodeList will be used.

Returns

{Array<HTMLElement>}

The nodeList passed to register.