Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit f3c285c21b72bb0cca6169f1cbaede89c416c907 1 parent 80e14eb
Simon Lindholm authored August 20, 2012

Showing 1 changed file with 3 additions and 5 deletions. Show diff stats Hide diff stats

  1. 8  extension/content/firebug/chrome/reps.js
8  extension/content/firebug/chrome/reps.js
@@ -671,7 +671,7 @@ FirebugReps.Arr = domplate(Firebug.Rep,
671 671
 
672 672
     highlightObject: function(object, context, target)
673 673
     {
674  
-        // Highlighting huge amount of elements on the page can cause sericous performance
  674
+        // Highlighting huge amount of elements on the page can cause serious performance
675 675
         // problems (see issue 4736). So, avoid highlighting if the number of elements in
676 676
         // the array exceeds specified limit.
677 677
         var arr = this.getRealObject(object, context);
@@ -907,14 +907,12 @@ FirebugReps.Element = domplate(Firebug.Rep,
907 907
     {
908 908
         try
909 909
         {
910  
-            return elt.getAttribute("class")
911  
-                ? ("." + elt.getAttribute("class").split(" ")[0])
912  
-                : "";
  910
+            return elt.classList.length > 0 ? ("." + elt.classList[0]) : "";
913 911
         }
914 912
         catch (err)
915 913
         {
  914
+            return "";
916 915
         }
917  
-        return "";
918 916
     },
919 917
 
920 918
     getValue: function(elt)

0 notes on commit f3c285c

Please sign in to comment.
Something went wrong with that request. Please try again.