mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-22 00:17:32 +09:00
waiter waiter more webextensions please
This commit is contained in:
parent
3837792171
commit
bb0adb61ae
10 changed files with 198 additions and 8 deletions
|
|
@ -115,6 +115,20 @@ function WebNavigationEventManager(context, eventName) {
|
|||
parentFrameId: ExtensionManagement.getParentFrameId(data.parentWindowId, data.windowId),
|
||||
};
|
||||
|
||||
if (eventName == "onCreatedNavigationTarget") {
|
||||
let source = {};
|
||||
extensions.emit("fill-browser-data", data.sourceTabBrowser, source);
|
||||
if (!(source.tabId >= 0)) {
|
||||
return;
|
||||
}
|
||||
delete data2.frameId;
|
||||
delete data2.parentFrameId;
|
||||
data2.sourceTabId = source.tabId;
|
||||
data2.sourceFrameId = ExtensionManagement.getFrameId(data.sourceWindowId);
|
||||
// Firefox does not expose renderer process IDs through this API.
|
||||
data2.sourceProcessId = -1;
|
||||
}
|
||||
|
||||
if (eventName == "onErrorOccurred") {
|
||||
data2.error = data.error;
|
||||
}
|
||||
|
|
@ -162,7 +176,7 @@ extensions.registerSchemaAPI("webNavigation", "addon_parent", context => {
|
|||
onErrorOccurred: new WebNavigationEventManager(context, "onErrorOccurred").api(),
|
||||
onReferenceFragmentUpdated: new WebNavigationEventManager(context, "onReferenceFragmentUpdated").api(),
|
||||
onHistoryStateUpdated: new WebNavigationEventManager(context, "onHistoryStateUpdated").api(),
|
||||
onCreatedNavigationTarget: ignoreEvent(context, "webNavigation.onCreatedNavigationTarget"),
|
||||
onCreatedNavigationTarget: new WebNavigationEventManager(context, "onCreatedNavigationTarget").api(),
|
||||
getAllFrames(details) {
|
||||
let tab = TabManager.getTab(details.tabId, context);
|
||||
|
||||
|
|
|
|||
|
|
@ -284,7 +284,6 @@
|
|||
},
|
||||
{
|
||||
"name": "onCreatedNavigationTarget",
|
||||
"unsupported": true,
|
||||
"type": "function",
|
||||
"description": "Fired when a new window, or a new tab in an existing window, is created to host a navigation.",
|
||||
"parameters": [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue