From 648ebabc0901dcacbefe03b63d06fa8758d10026 Mon Sep 17 00:00:00 2001 From: Rob Campbell Date: Fri, 8 Apr 2011 14:20:41 -0700 Subject: [PATCH] Bug 616742 - Implement console.debug() (was: Navigation broken on Citytv website); r=ddahl,jonas --- dom/base/ConsoleAPI.js | 7 ++++++- .../browser/browser_webconsole_console_logging_api.js | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dom/base/ConsoleAPI.js b/dom/base/ConsoleAPI.js index 8fcd9ca02382..1a383f7d37a2 100644 --- a/dom/base/ConsoleAPI.js +++ b/dom/base/ConsoleAPI.js @@ -76,11 +76,15 @@ ConsoleAPI.prototype = { error: function CA_error() { self.notifyObservers(id, "error", arguments); }, + debug: function CA_debug() { + self.notifyObservers(id, "log", arguments); + }, __exposedProps__: { log: "r", info: "r", warn: "r", - error: "r" + error: "r", + debug: "r", } }; @@ -95,6 +99,7 @@ ConsoleAPI.prototype = { info: bind.call(x.info, x),\ warn: bind.call(x.warn, x),\ error: bind.call(x.error, x),\ + debug: bind.call(x.debug, x),\ __noSuchMethod__: function() {}\ };\ Object.defineProperty(obj, '__mozillaConsole__', { value: true });\ diff --git a/toolkit/components/console/hudservice/tests/browser/browser_webconsole_console_logging_api.js b/toolkit/components/console/hudservice/tests/browser/browser_webconsole_console_logging_api.js index 8fcacee553e2..d253518c47a2 100644 --- a/toolkit/components/console/hudservice/tests/browser/browser_webconsole_console_logging_api.js +++ b/toolkit/components/console/hudservice/tests/browser/browser_webconsole_console_logging_api.js @@ -56,6 +56,7 @@ function onLoad() { testConsoleLoggingAPI("info"); testConsoleLoggingAPI("warn"); testConsoleLoggingAPI("error"); + testConsoleLoggingAPI("debug"); // bug 616742 finishTest(); }