Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Revert "Issue 5841: Short tag of element rep treats class=" a" as hav…

…ing a class """

It was meant for master only.
  • Loading branch information...
commit b7ecd246cd77562381d731aea34e665ef348070b 1 parent 3af1eb2
Simon Lindholm authored August 20, 2012

Showing 1 changed file with 5 additions and 3 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 serious performance
  674
+        // Highlighting huge amount of elements on the page can cause sericous 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);
@@ -910,12 +910,14 @@ FirebugReps.Element = domplate(Firebug.Rep,
910 910
     {
911 911
         try
912 912
         {
913  
-            return elt.classList.length > 0 ? ("." + elt.classList[0]) : "";
  913
+            return elt.getAttribute("class")
  914
+                ? ("." + elt.getAttribute("class").split(" ")[0])
  915
+                : "";
914 916
         }
915 917
         catch (err)
916 918
         {
917  
-            return "";
918 919
         }
  920
+        return "";
919 921
     },
920 922
 
921 923
     getValue: function(elt)

0 notes on commit b7ecd24

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