links) { if (link.url) { let data = await lazy.UrlbarUtils.getShortcutOrURIAndPostData(link.url); // Allow third-party services to fixup this URL. lazy.URILoadingHelper.openLinkIn(win, data.url, where, { postData: data.postData, allowThirdPartyFixup: true, triggeringPrincipal, policyContainer, }); } } }, async onDropNewWindowButtonObserver(aEvent) { const win = aEvent.target.ownerGlobal; let links = Services.droppedLinkHandler.dropLinks(aEvent); if ( links.length >= Services.prefs.getIntPref("browser.tabs.maxOpenBeforeWarn") ) { // Sync dialog cannot be used inside drop event handler. let answer = await lazy.OpenInTabsUtils.promiseConfirmOpenInTabs( links.length, win ); if (!answer) { return; } } let triggeringPrincipal = Services.droppedLinkHandler.getTriggeringPrincipal(aEvent); let policyContainer = Services.droppedLinkHandler.getPolicyContainer(aEvent); for (let link of links) { if (link.url) { let data = await lazy.UrlbarUtils.getShortcutOrURIAndPostData(link.url); // Allow third-party services to fixup this URL. lazy.URILoadingHelper.openLinkIn(win, data.url, "window", { // TODO fix allowInheritPrincipal // (this is required by javascript: drop to the new window) Bug 1475201 allowInheritPrincipal: true, postData: data.postData, allowThirdPartyFixup: true, triggeringPrincipal, policyContainer, }); } } }, }; PK