User:Locke/common.js: Difference between revisions
Jump to navigation
Jump to search
Want an adless experience? Log in or Create an account.
No edit summary |
No edit summary |
||
Line 78: | Line 78: | ||
}; | }; | ||
var getChildrenByTagName = function(parent, name) { | |||
var nodeList = []; | |||
for (var child = parent.firstChild; child != null; child = child.nextSibling) { | |||
if (child.nodeType == 1 && name == child.nodeName) { nodeList.push(child); } | |||
} | |||
return nodeList; | |||
}; | |||