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 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.
Access to the parent element of this node.
Access to the parent node of this node.
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.
Gets the state to reach when persisting this node to the DOM.
ProtectedcontinueHelper 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.
Optionalcondition: string | ChildPredicatestring: the node name to match (ignoring case), predicate: the predicate to apply.
Signals, if this element is empty.
OptionalconsiderChildNode: ChildPredicatesignals, if a given node shall be considered while determining empty state
Persists the applied changes to the DOM.
ProtectedpersistPersists, to keep the current node. May be overwritten for example to apply additional changes to the node like changing attributes of an element.
ProtectedpersistPersists removal of all child nodes.
ProtectedpersistPersists the deletion of this node and all its child nodes.
ProtectedpersistPersists, that only the node itself shall be removed. The default implementation will replace the node with its child nodes.
ProtectedrequireWill raise an error, if this element is not mutable.
ProtectedrestartHelper function for return value, which signals "restart from".
node to restart from
StaticproxyWraps 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.