Returns the wrapped delegate.
This delegate should not be used for directly manipulating the DOM, as nested rules may not veto applied changes.
If a manipulation is done, it must be ensured, that previously run rules on this node may be rerun. It is generally considered safe to do manipulation to child elements, as these are processed after this node, so that all applicable rules have a chance to modify these nodes again.
Signals, if this node is empty, thus, has no child nodes.
isEmpty
Signals, if this is the last node in parent. Always false
if no
parent exists.
Signals, if this element is mutable.
Retrieves the name of the node (lower case).
Access owner document.
Retrieves the name of the node (lower case).
If renaming is supported by this instance, it may differ from
name
, otherwise, it is the same.
Signals, if this node is meant to be removed. This includes recursive removal (including children) as well as just removing this node (replacing it by its children).
Signals, if this mutable element represents a state, where the element shall be removed, including all its children.
It is important to note, that setting this modifies the NodeProxy#state, thus setting this overrides any other decisions upon the state of the node.
Duplicate Spaces: If you apply this modification, it may
end up having duplicate space characters in your DOM. For example if
removing the `
you will end up having:
with two white space characters in the middle. You may want to detect such
states, and remove the duplicate space. You shouldn't do this, though, if
you are within a space preserving context such as ``.
Signals, if this node represents a state, where the children of the node should be removed.
Sets, if this node represents a state, where the children of the node shall be removed.
It is important to note, that setting this modifies the NodeProxy#state, thus setting this overrides any other decisions upon the state of the node.
true
to mark as remove children; false
otherwise.
Signals, if this node represents a state, where the node shall be removed, while attaching the children to the parent node.
Sets, if this node represents a state, where the node shall be removed, while attaching the children to the parent node.
It is important to note, that setting this modifies the NodeProxy#state, thus setting this overrides any other decisions upon the state of the node.
true
to mark as replace with children; false
otherwise.
Signals, if this is the only child node at parent node.
Protected
continueHelper function for return value, which signals to continue with another node, but to do not abort current processing.
node to continue with
Get first (matching) child node of the given element.
Optional
condition: string | ChildPredicatestring: the node name to match (ignoring case), predicate: the predicate to apply.
Signals, if this element is empty.
Optional
considerChildNode: ChildPredicatesignals, if a given node shall be considered while determining empty state
Protected
persistPersists, to keep the current node. May be overwritten for example to apply additional changes to the node like changing attributes of an element.
Protected
persistPersists removal of all child nodes.
Protected
persistPersists the deletion of this node and all its child nodes.
Protected
persistPersists, that only the node itself shall be removed. The default implementation will replace the node with its child nodes.
Protected
requireProtected
restartHelper function for return value, which signals "restart from".
node to restart from
Static
proxyWraps the given node into a NodeProxy. If the node is falsy, null
will be returned.
node to wrap
signals, if this representation is mutable or not
NodeProxy for given node; null
for falsy values
A wrapper for DOM nodes, to store changes to be applied to the DOM structure later on.