Bug 1224751 - Use the window's console in BrowserLoader. r=jlongster
--- a/devtools/client/shared/browser-loader.js
+++ b/devtools/client/shared/browser-loader.js
@@ -65,16 +65,19 @@ function BrowserLoader(baseURI, window)
if (!uri.startsWith(baseURI) && !isBrowserDir) {
return devtools.require(uri);
}
return require(uri);
},
globals: {
+ // Allow modules to use the window's console to ensure logs appear in a
+ // tab toolbox, if one exists, instead of just the browser console.
+ console: window.console,
// Make sure 'define' function exists. This allows reusing AMD modules.
define: function(callback) {
callback(this.require, this.exports, this.module);
return this.exports;
}
}
};