DBOXED_AUXILIARY_NAVIGATION; docShell.useTrackingProtection = true; // Get the document to force a content viewer to be created, otherwise // the first load can fail. if (!this.document) { return false; } let loadURIOptions = { // Bug 1498603 verify usages of systemPrincipal here triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(), loadFlags: Ci.nsIWebNavigation.LOAD_FLAGS_STOP_CONTENT, }; try { // Some URIs like external protocols don't necessarily stop the // ongoing network activity. See also bug 1917863. docShell.stop(Ci.nsIWebNavigation.STOP_ALL); docShell.loadURI( Services.io.newURI(message.data.url), loadURIOptions ); } catch (ex) { return false; } return true; } } return undefined; } handleEvent(event) { if (event.type == "DOMDocElementInserted") { // Arrange to prevent (most) popup dialogs for this window - popups done // in the parent (eg, auth) aren't prevented, but alert() etc are. // disableDialogs only works on the current inner window, so it has // to be called every page load, but before scripts run. this.contentWindow.windowUtils.disableDialogs(); } } } PK