Index: Source/devtools/front_end/toolbox_bootstrap/Toolbox.js |
diff --git a/Source/devtools/front_end/toolbox_bootstrap/Toolbox.js b/Source/devtools/front_end/toolbox_bootstrap/Toolbox.js |
index 66b7dfdf72ec91784df87a2e3aff6a77719e6143..ae010b4cef652e1d6a05bc64259b7e8b2909fabd 100644 |
--- a/Source/devtools/front_end/toolbox_bootstrap/Toolbox.js |
+++ b/Source/devtools/front_end/toolbox_bootstrap/Toolbox.js |
@@ -2,30 +2,31 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+// FIXME: This stub is invoked from the backend and should be removed |
+// once we migrate to the "pull" model for extensions retrieval. |
+WebInspector = {}; |
+WebInspector.addExtensions = function() {}; |
+ |
+(function() |
+{ |
+ |
/** |
- * @constructor |
* @suppressGlobalPropertiesCheck |
*/ |
-WebInspector.Toolbox = function() |
+function toolboxLoaded() |
{ |
if (!window.opener) |
return; |
- |
- var host = /** @type {!WebInspector.ToolboxHost} */ (window.opener.WebInspector["app"]); |
- host.toolboxLoaded(document); |
+ window.opener.WebInspector["app"]["toolboxLoaded"](document); |
} |
-// FIXME: This stub is invoked from the backend and should be removed |
-// once we migrate to the "pull" model for extensions retrieval. |
-WebInspector.addExtensions = function() {} |
- |
/** |
* @suppressGlobalPropertiesCheck |
*/ |
function windowLoaded() |
{ |
window.removeEventListener("DOMContentLoaded", windowLoaded, false); |
- new WebInspector.Toolbox(); |
+ toolboxLoaded(); |
} |
/** |
@@ -34,8 +35,10 @@ function windowLoaded() |
function initToolbox() |
{ |
if (document.readyState === "complete") |
- new WebInspector.Toolbox(); |
+ toolboxLoaded(); |
else |
window.addEventListener("DOMContentLoaded", windowLoaded, false); |
} |
initToolbox(); |
+ |
+})(); |