/* 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/. */
/** * Global Application object in this panel. This object is expected by panel.js and is * called to start the UI for the panel.
*/
window.Application = {
async bootstrap({ toolbox, commands }) { // bind event handlers to `this` this.updateDomain = this.updateDomain.bind(this);
// wrap updateWorkers to swallow rejections occurring after destroy this.safeUpdateWorkers = safeAsyncMethod(
() => this.updateWorkers(),
() => this._destroyed
);
onResourceAvailable(resources) { // Only consider top level document, and ignore remote iframes top document const hasDocumentDomComplete = resources.some(
resource =>
resource.resourceType === this._commands.resourceCommand.TYPES.DOCUMENT_EVENT &&
resource.name === "dom-complete" &&
resource.targetFront.isTopLevel
); if (hasDocumentDomComplete) { this.handleOnNavigate(); // update domain and manifest for the new target
}
},
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.