Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 92799ebf9444f601f5fe59f1e3f3b6a4704e298e 1 parent f6dfa8b
Simon Lindholm authored August 28, 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);
@@ -910,14 +910,12 @@ FirebugReps.Element = domplate(Firebug.Rep,
910 910
     {
911 911
         try
912 912
         {
913  
-            return elt.getAttribute("class")
914  
-                ? ("." + elt.getAttribute("class").split(" ")[0])
915  
-                : "";
  913
+            return elt.classList.length > 0 ? ("." + elt.classList[0]) : "";
916 914
         }
917 915
         catch (err)
918 916
         {
  917
+            return "";
919 918
         }
920  
-        return "";
921 919
     },
922 920
 
923 921
     getValue: function(elt)

0 notes on commit 92799eb

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