mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-05 20:15:58 +00:00
a63928cdfc
--HG-- rename : dom/browser-element/BrowserElementChild.js => dom/browser-element/BrowserElementChildPreload.js rename : dom/browser-element/BrowserElementScrolling.js => dom/browser-element/BrowserElementPanning.js
37 lines
1.3 KiB
JavaScript
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;
|