gecko/dom/browser-element/BrowserElementChild.js
Vivien Nicolas ext:(%20and%20Chris%20Jones%20%3Cjones.chris.g%40gmail.com%3E) 8256807f98 Bug 835809: Preload more things for faster page loads. r=fabrice,jlebar
--HG--
rename : dom/browser-element/BrowserElementChild.js => dom/browser-element/BrowserElementChildPreload.js
rename : dom/browser-element/BrowserElementScrolling.js => dom/browser-element/BrowserElementPanning.js
2013-02-07 21:10:01 -08:00

37 lines
1.3 KiB
JavaScript

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
let { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/Geometry.jsm");
function debug(msg) {
//dump("BrowserElementChild - " + msg + "\n");
}
// NB: this must happen before we process any messages from
// mozbrowser API clients.
docShell.isActive = true;
let infos = sendSyncMessage('browser-element-api:call',
{ 'msg_name': 'hello' })[0];
docShell.QueryInterface(Ci.nsIDocShellTreeItem).name = infos.name;
docShell.setFullscreenAllowed(infos.fullscreenAllowed);
if (!('BrowserElementIsPreloaded' in this)) {
// This is a produc-specific file that's sometimes unavailable.
try {
Services.scriptloader.loadSubScript("chrome://browser/content/forms.js");
} catch (e) {
}
Services.scriptloader.loadSubScript("chrome://global/content/BrowserElementPanning.js");
Services.scriptloader.loadSubScript("chrome://global/content/BrowserElementChildPreload.js");
}
var BrowserElementIsReady = true;