Matt's DOM Utils Matt's DOM Utils (Utils)

Utils.traverse

Info

A module containing rich document tree traversal methods.

  1. Filter Methods
  2. Retrieval Methods
  3. Clearance Methods

Filter Methods

These methods are “filter” methods, meaning they will return an array-like object of results from each callback invocation. A result of true will collect the object passed; a truthy result will collect the value returned; a falsey result will not be collected. An example follows.

function handler(
	obj
)
{
	var result = false;
	if (obj && obj.id === "unique") {
		// criterion met
		result = true;
	}
	return result;
}

Retrieval Methods

Clearance Methods