Documentation

PrototypeNode

Tags
extends

\DOMNode

Table of Contents

cleanWhitespace()  : PrototypeNode
Removes all of element's child text nodes that contain only whitespace. Returns element.
empty()  : bool
Tests whether element is empty (i.e., contains only whitespace).
importNode()  : PrototypeNode
Imports a new node into the document
inspect()  : string
Returns the debug-oriented string representation of element.
match()  : bool
Checks if element matches the given CSS selector.
name()  : string
Returns the node name (convenience method)
purge()  : PrototypeNode
Removes all child elements from the current element (not to confuse with the prototype method of the same name)
recursivelyCollect()  : NodeList
Recursively collects elements whose relationship to element is specified by property.
removeNode()  : PrototypeNode
Completely removes element from the document and returns it.
replace()  : PrototypeNode
Replaces element itself with newContent and returns element.
value()  : string
Returns the node value, optionally trims whitespace (default)

Methods

name()

Returns the node name (convenience method)

public name() : string
Return values
string

recursivelyCollect()

Recursively collects elements whose relationship to element is specified by property.

public recursivelyCollect(string $property[, int $maxLength = null ][, int $nodeType = null ]) : NodeList

property has to be a property of element that points to a single DOM node (e.g., nextSibling or parentNode).

Parameters
$property : string
$maxLength : int = null
$nodeType : int = null
Tags
link
http://api.prototypejs.org/dom/Element/recursivelyCollect/
Return values
NodeList

value()

Returns the node value, optionally trims whitespace (default)

public value([bool $trimmed = true ]) : string
Parameters
$trimmed : bool = true
Return values
string

Search results