Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Issue 5951: Title of array-like objects should be clickable

  • Loading branch information...
commit 3c90164e249b3144adcdb94bd53ea37763a6c718 1 parent a8016d3
Jan Odvarko authored

Showing 1 changed file with 17 additions and 4 deletions. Show diff stats Hide diff stats

  1. 21  extension/content/firebug/chrome/reps.js
21  extension/content/firebug/chrome/reps.js
@@ -794,13 +794,18 @@ FirebugReps.Arr = domplate(FirebugReps.ArrBase,
794 794
 
795 795
 // ********************************************************************************************* //
796 796
 
797  
-FirebugReps.ArrayishObject = domplate(FirebugReps.ArrBase,
  797
+/**
  798
+ * Any arrayish object that is not directly Array type (e.g. HTMLCollection, NodeList, etc.)
  799
+ */
  800
+FirebugReps.ArrayLikeObject = domplate(FirebugReps.ArrBase,
798 801
 {
799 802
     tag:
800 803
         OBJECTBOX({_repObject: "$object",
801 804
             $hasTwisty: "$object|hasSpecialProperties",
802 805
             onclick: "$onToggleProperties"},
803  
-            SPAN({"class": "objectTitle"}, "$object|getTitle "),
  806
+            A({"class": "objectTitle objectLink", onclick: "$onClickTitle"},
  807
+                "$object|getTitle"
  808
+            ),
804 809
             SPAN({"class": "arrayLeftBracket", role: "presentation"}, "["),
805 810
             FOR("item", "$object|longArrayIterator",
806 811
                 TAG("$item.tag", {object: "$item.object"}),
@@ -814,7 +819,9 @@ FirebugReps.ArrayishObject = domplate(FirebugReps.ArrBase,
814 819
         OBJECTBOX({_repObject: "$object",
815 820
             $hasTwisty: "$object|hasSpecialProperties",
816 821
             onclick: "$onToggleProperties"},
817  
-            SPAN({"class": "objectTitle"}, "$object|getTitle "),
  822
+            A({"class": "objectTitle objectLink", onclick: "$onClickTitle"},
  823
+                "$object|getTitle"
  824
+            ),
818 825
             SPAN({"class": "arrayLeftBracket", role: "presentation"}, "["),
819 826
             FOR("item", "$object|shortArrayIterator",
820 827
                 TAG("$item.tag", {object: "$item.object"}),
@@ -824,6 +831,12 @@ FirebugReps.ArrayishObject = domplate(FirebugReps.ArrBase,
824 831
             SPAN({"class": "arrayProperties", role: "group"})
825 832
         ),
826 833
 
  834
+    onClickTitle: function(event)
  835
+    {
  836
+        var obj = Firebug.getRepObject(event.target);
  837
+        Firebug.chrome.select(obj);
  838
+    },
  839
+
827 840
     getTitle: function(object, context)
828 841
     {
829 842
         const re =/\[object ([^\]]*)/;
@@ -3242,7 +3255,7 @@ Firebug.registerRep(
3242 3255
     FirebugReps.Except,
3243 3256
     FirebugReps.XML,
3244 3257
     FirebugReps.Arr,
3245  
-    FirebugReps.ArrayishObject,
  3258
+    FirebugReps.ArrayLikeObject,
3246 3259
     FirebugReps.XPathResult,
3247 3260
     FirebugReps.Storage,
3248 3261
     FirebugReps.Attr,

0 notes on commit 3c90164

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