Skip to content

Commit

Permalink
little fix for Dom.getElementsByAttribute
Browse files Browse the repository at this point in the history
  • Loading branch information
fflorent committed Jan 24, 2013
1 parent f2e2795 commit 5a59f86
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions extension/content/firebug/lib/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,13 @@ Dom.getElementsByAttribute = function(node, attrName, attrValue)
{
function iteratorHelper(node, attrName, attrValue, result)
{
// xxxFlorent: sadly, Documents and DocumentFragments do not have firstElementChild
// properties currently.
for (var child = node.firstChild; child; child = child.nextSibling)
{
if (child.nodeType !== document.ELEMENT_NODE)
continue;

if (child.getAttribute(attrName) == attrValue)
result.push(child);

Expand Down

0 comments on commit 5a59f86

Please sign in to comment.