Skip to content

Commit

Permalink
Issue 5841: Short tag of element rep treats class=" a" as having a cl…
Browse files Browse the repository at this point in the history
  • Loading branch information
simonlindholm committed Aug 20, 2012
1 parent 80e14eb commit f3c285c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions extension/content/firebug/chrome/reps.js
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ FirebugReps.Arr = domplate(Firebug.Rep,

highlightObject: function(object, context, target)
{
// Highlighting huge amount of elements on the page can cause sericous performance
// Highlighting huge amount of elements on the page can cause serious performance
// problems (see issue 4736). So, avoid highlighting if the number of elements in
// the array exceeds specified limit.
var arr = this.getRealObject(object, context);
Expand Down Expand Up @@ -907,14 +907,12 @@ FirebugReps.Element = domplate(Firebug.Rep,
{
try
{
return elt.getAttribute("class")
? ("." + elt.getAttribute("class").split(" ")[0])
: "";
return elt.classList.length > 0 ? ("." + elt.classList[0]) : "";
}
catch (err)
{
return "";
}
return "";
},

getValue: function(elt)
Expand Down

0 comments on commit f3c285c

Please sign in to comment.