Elementals.js

Latest Version: 3.7 Final 20 December 2018

Method _.Node.eachAll

Iterates through all nodes inside the passed Element that matches the mask, passing that node to a callback function.

Calling Convention:
_.Node.eachAll(Element, callback[, nodeMask || tagName])
Parameters:
Element
The Element that all nodes matching the mask inside of will be run past the callbackfunction.
callback
A function handler for all matching nodes inside Element
nodeMask optional

A bitwise mask used to filter the results. See the Node Masking page for more information.

If omitted, a mask of 1 (matching for nodeType 1) is used.

tagName optional
A tagName to match. When used instead of a nodeMask only elements of node type 1 with a matching tagName will be counted.
Returns:
Nothing

Example

JavaScript

var test = document.getElementById('test');
_.Node.eachAll(
	_d.getElementByID('test'),
	function(e) {
		console.log(e.tagName);
	}
);

Will output the name of every tag contained inside #test as the default mask is nodeType 1.