lib/client/dom_spotting.js
function checkChildren(mutation, node, seen) {

	var attr,
	    k,
	    l;

	if (seen == null) {
		seen = initial_seen;
	}

	// Ignore text nodes
	if (node.nodeType === 3 || node.nodeType === 8) {
		return;
	}

	// Only check attributes for nodes that haven't been checked before
	if (!seen.get(node)) {

		// Indicate this node has been checked
		seen.set(node, true);

		// Go over every attribute
		if (node.attributes) {
			for (k = 0; k < node.attributes.length; k++) {
				attr = node.attributes[k];

				if (attributes[attr.name]) {
					for (l = 0; l < attributes[attr.name].length; l++) {
						attributes[attr.name][l](node, attr.value, null, true);
					}
				}
			}
		}
	}

	// Now check the children
	for (k = 0; k < node.childNodes.length; k++) {
		checkChildren(mutation, node.childNodes[k], seen);
	}
}
function checkChildren(mutation, node, seen) {

	var attr,
	    k,
	    l;

	if (seen == null) {
		seen = initial_seen;
	}

	// Ignore text nodes
	if (node.nodeType === 3 || node.nodeType === 8) {
		return;
	}

	// Only check attributes for nodes that haven't been checked before
	if (!seen.get(node)) {

		// Indicate this node has been checked
		seen.set(node, true);

		// Go over every attribute
		if (node.attributes) {
			for (k = 0; k < node.attributes.length; k++) {
				attr = node.attributes[k];

				if (attributes[attr.name]) {
					for (l = 0; l < attributes[attr.name].length; l++) {
						attributes[attr.name][l](node, attr.value, null, true);
					}
				}
			}
		}
	}

	// Now check the children
	for (k = 0; k < node.childNodes.length; k++) {
		checkChildren(mutation, node.childNodes[k], seen);
	}
}
function checkChildren ( mutation , node , seen ) { var attr , k , l ; if ( seen == null ) { seen = initial_seen ; } // Ignore text nodes if ( node . nodeType === 3 || node . nodeType === 8 ) { return ; } // Only check attributes for nodes that haven't been checked before if ( ! seen . get ( node ) ) { // Indicate this node has been checked seen . set ( node , true ) ; // Go over every attribute if ( node . attributes ) { for ( k = 0 ; k < node . attributes . length ; k ++ ) { attr = node . attributes [ k ] ; if ( attributes [ attr . name ] ) { for ( l = 0 ; l < attributes [ attr . name ] . length ; l ++ ) { attributes [ attr . name ] [ l ] ( node , attr . value , null , true ) ; } } } } } // Now check the children for ( k = 0 ; k < node . childNodes . length ; k ++ ) { checkChildren ( mutation , node . childNodes [ k ] , seen ) ; } }
Check this added node and all its children

@author   Jelle De Loecker <jelle@develry.be>
@since    1.0.0
@version  1.0.0

@param    {Object}   mutation
@param    {Node}     node
@param    {WeakMap}  seen
Check this added node and all its children