Permalink
Browse files

Another heper command for tabGrip(s)

  • Loading branch information...
1 parent dbaac03 commit 0b1edafbc40cf48b995fa8c1d5c3a7d8a9a6af0e @janodvarko janodvarko committed Sep 30, 2012
Showing with 36 additions and 0 deletions.
  1. +36 −0 extension/content/firebug/debugger/commands.js
@@ -9,6 +9,9 @@ function(FBTrace, RDP) {
// ********************************************************************************************* //
// Constants
+// ********************************************************************************************* //
+// Command Implementation
+
function pauseGrip(context, args)
{
var actor = args[0];
@@ -44,6 +47,34 @@ function pauseGrip(context, args)
return Firebug.Console.getDefaultReturnValue(context.window);
}
+function tabGrip(context, args)
+{
+ var actor = args[0];
+ var type = args[1];
+
+ var context = Firebug.currentContext;
+ if (!context)
+ return "No current context";
+
+ if (!actor)
+ return "No actor specified";
+
+ if (!type)
+ return "No type specified";
+
+ var packet = {
+ to: actor,
+ type: type
+ };
+
+ Firebug.proxy.connection.request(packet, function(response)
+ {
+ Firebug.Console.log(response);
+ });
+
+ return Firebug.Console.getDefaultReturnValue(context.window);
+}
+
// ********************************************************************************************* //
// Registration
@@ -52,6 +83,11 @@ Firebug.registerCommand("pauseGrip", {
description: "Helper command for accessing server side Grips. For debugging purposes only."
})
+Firebug.registerCommand("tabGrip", {
+ handler: tabGrip.bind(this),
+ description: "Helper command for accessing server side tab child Grips. For debugging purposes only."
+})
+
return {};
// ********************************************************************************************* //

1 comment on commit 0b1edaf

Member

SebastianZ commented on 0b1edaf Sep 30, 2012

Please re-read your commit messages before committing.

Sebastian

Please sign in to comment.