Bug 683510 - GCLI needs a 'console' command; r=msucan
authorBerker Peksag <berker.peksag@gmail.com>
Mon, 09 Jan 2012 15:38:48 +0000
changeset 85329 fdab6d891be0645b2cbb2842df8c9d66e2f4e3de
parent 85328 62cca592625d6be53dcd2e31acb844c55555d975
child 85330 83afca21c9e63b62b8e82d8bb83199cef449cb8c
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmsucan
bugs683510
milestone12.0a1
Bug 683510 - GCLI needs a 'console' command; r=msucan
browser/devtools/webconsole/GcliCommands.jsm
browser/locales/en-US/chrome/browser/devtools/gclicommands.properties
--- a/browser/devtools/webconsole/GcliCommands.jsm
+++ b/browser/devtools/webconsole/GcliCommands.jsm
@@ -80,16 +80,28 @@ gcli.addCommand({
   exec: function(args, context) {
     let hud = HUDService.getHudReferenceById(context.environment.hudId);
     hud.gcliterm.clearOutput();
   }
 });
 
 
 /**
+ * 'console close' command
+ */
+gcli.addCommand({
+  name: "console close",
+  description: gcli.lookup("consolecloseDesc"),
+  exec: function(args, context) {
+    let tab = HUDService.getHudReferenceById(context.environment.hudId).tab;
+    HUDService.deactivateHUDForContext(tab);
+  }
+});
+
+/**
  * 'inspect' command
  */
 gcli.addCommand({
   name: "inspect",
   description: gcli.lookup("inspectDesc"),
   manual: gcli.lookup("inspectManual"),
   params: [
     {
--- a/browser/locales/en-US/chrome/browser/devtools/gclicommands.properties
+++ b/browser/locales/en-US/chrome/browser/devtools/gclicommands.properties
@@ -50,8 +50,13 @@ inspectManual=Investigate the dimensions
 # 'node' parameter to the 'inspect' command, which is displayed in a dialog
 # when the user is using this command.
 inspectNodeDesc=CSS selector
 
 # LOCALIZATION NOTE (inspectNodeManual) A fuller description of the 'node'
 # parameter to the 'inspect' command, displayed when the user asks for help
 # on what it does.
 inspectNodeManual=A CSS selector for use with Document.querySelector which identifies a single element
+
+# LOCALIZATION NOTE (consolecloseDesc) A very short description of the
+# 'console close' command. This string is designed to be shown in a menu
+# alongside the command name, which is why it should be as short as possible.
+consolecloseDesc=Close the console