Utils.select
A module containing various methods of node selection sourced from various versions of the DOM Core and DOM HTML specifications.
Utils.select.byName
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps getElementsByName
,
which in turn returns element nodes with a matching
name
property.
Return value: Array || null
Utils.select.byTagName
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps getElementsByTagName
,
which in turn returns element
node-like objects
from the caller's
subtree
with a matching nodeName
property.
"*"
returns all element
node-like objects
from the caller's
subtree.
Return value: Array || null
Utils.select.byTagNameNS
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps getElementsByTagNameNS
,
which in turn returns element
node-like objects
from the caller's
subtree
with a matching local name and namespace.
"*"
matches all namespaces from the caller's
subtree.
"*"
matches all local names in the
caller's subtree.
Return value: Array || null
Utils.select.byClassName
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps getElementsByClassName
,
which in turn returns element
node-like objects
from the caller's
subtree
with matching class “name(s)”.
Return value: Array || null
Utils.select.byId
Method that wraps getElementById
,
which in turn returns the first element
node-like object
from the caller's
subtree
with a matching id
property.
Return value: Object || null
Utils.select.query
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps querySelector
,
which in turn returns an element
node-like object
from the caller's
subtree
that matches the selector(s) used.
Return value: Object || null
Utils.select.queryAll
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps querySelectorAll
,
which in turn returns element
node-like objects
from the caller's
subtree
that match the selector(s) used.
Return value: Array || null
Utils.select.head
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps document.head
,
which in turn returns the head
element
of the specified document node-like object.
Return value: Object || null
Utils.select.body
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps document.body
,
which in turn returns the body
element
of the specified document node-like object.
Return value: Object || null
Utils.select.images
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps document.images
,
which in turn returns the
node-like object(s)
registered for the specified key .
Return value: Array || Object || null
Utils.select.allImages
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps document.images
,
which in turn returns the entire
HTMLCollection
.
Return value: Array || null
Utils.select.embeds
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps document.embeds
,
which in turn returns the
node-like object(s)
registered for the specified key.
Return value: Array || Object || null
Utils.select.allEmbeds
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps document.embeds
,
which in turn returns the entire
HTMLCollection
.
Return value: Array || null
Utils.select.plugins
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps document.plugins
,
which in turn returns the node-like object(s)
registered for the specified key.
Return value: Array || Object || null
Utils.select.allPlugins
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps document.plugins
,
which in turn returns the entire
HTMLCollection
.
Return value: Array || null
Utils.select.links
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps document.links
,
which in turn returns the node-like object(s)
registered for the specified key.
Return value: Array || Object || null
Utils.select.allLinks
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps document.links
,
which in turn returns the entire
HTMLCollection
.
Return value: Array || null
Utils.select.forms
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps document.forms
,
which in turn returns the node-like object(s)
registered for the specified key.
Return value: Array || Object || null
Utils.select.allForms
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps document.forms
,
which in turn returns the entire
HTMLCollection
.
Return value: Array || null
Utils.select.scripts
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps document.scripts
,
which in turn returns the node-like object(s)
registered for the specified key.
Return value: Array || Object || null
Utils.select.allScripts
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps document.scripts
,
which in turn returns the entire
HTMLCollection
.
Return value: Array || null
Utils.select.applets
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps document.applets
,
which in turn returns the node-like object(s)
registered for the specified key.
Return value: Array || Object || null
Utils.select.allApplets
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps document.applets
,
which in turn returns the entire
HTMLCollection
.
Return value: Array || null
Utils.select.anchors
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps document.anchors
,
which in turn returns the node-like object(s)
registered for the specified key.
Return value: Array || Object || null
Utils.select.allAnchors
Warning: this property will return null
if the host environment is detected to be unsuitable;
an if
block or a similar construct should
be used for detection.
Method that wraps document.anchors
,
which in turn returns the entire
HTMLCollection
.
Return value: Array || null
Utils.select.namedItem
Method that returns either an
array-like object
or a
node-like object
representing the specified name of a specific
HTMLCollection
.
HTMLCollection
.
Return value: Array || Object || null
Utils.select.collection
Method that returns an
array-like object
representing the specified HTMLCollection
.
Return value: Array || null