Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Issue 5841: Short tag of element rep treats class=" a" as having a cl…

  • Loading branch information...
commit 3af1eb25fb160b3eadecdf042a1641ad0e3194cf 1 parent 05417c1
@simonlindholm simonlindholm authored
Showing with 3 additions and 5 deletions.
  1. +3 −5 extension/content/firebug/chrome/reps.js
View
8 extension/content/firebug/chrome/reps.js
@@ -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);
@@ -910,14 +910,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)
Please sign in to comment.
Something went wrong with that request. Please try again.