Tag

APIDocumentElementTag

Extends:
Element
Type:
Class

Source

Tag::constructor()

Source

Tag::name

Type:
String

Tag::children

Type:
Array

Tag::onChildrenChange(added, removed)

Parameters:
  • added — Element
  • removed — Element
Type:
Signal

Source

Tag::props

Type:
Element.Tag.Props

Tag::onPropsChange(attribute, oldValue)

Parameters:
  • attribute — String
  • oldValue — Any
Type:
Signal

Source

Tag::cloneDeep()

Returns:
Element.Tag

Source

Tag::getCopiedElement(lookForElement, copiedParent)

Parameters:
  • lookForElement — Element
  • copiedParent — Element
Returns:
Element

Source

Tag::getChildByAccessPath(accessPath)

Parameters:
  • accessPath — Array
Returns:
Element.Tag

Source

Tag::queryAll(query, onElement, onElementContext)

Parameters:
  • query — String
  • onElement — Functionoptional
  • onElementContext — Anyoptional
Returns:
Array

Source

Tag::query(query)

Parameters:
  • query — String
Returns:
Element

Source

Tag::watch(query)

Parameters:
  • query — String
Returns:
Watcher
var watcher = doc.watch('div > * > b[attr]');
watcher.onAdd(function(tag){});
watcher.onRemove(function(tag){});
watcher.disconnect();

Source

Tag::stringify(replacements)

Parameters:
  • replacements — Objectoptional
Returns:
String

Source

Tag::stringifyChildren(replacements)

Parameters:
  • replacements — Objectoptional
Returns:
String

Source

Tag::replace(oldElement, newElement)

Parameters:
  • oldElement — Element
  • newElement — Element

Source