From 0998460c7617764725a9edcac4dcccdc7218df57 Mon Sep 17 00:00:00 2001 From: Richard Bloor Date: Thu, 15 Jan 2026 11:59:36 +1300 Subject: [PATCH 1/3] Issue-28341 Safari and Chrome support for documentId and parentDocumentId --- .../webextensions/api/scripting/executescript/index.md | 3 +++ .../webextensions/api/scripting/injectiontarget/index.md | 5 ++++- .../add-ons/webextensions/api/tabs/connect/index.md | 2 ++ .../add-ons/webextensions/api/tabs/sendmessage/index.md | 2 ++ .../webextensions/api/webrequest/onauthrequired/index.md | 9 ++++++++- .../api/webrequest/onbeforeredirect/index.md | 8 ++++++++ .../api/webrequest/onbeforerequest/index.md | 8 ++++++++ .../api/webrequest/onbeforesendheaders/index.md | 8 ++++++++ .../webextensions/api/webrequest/oncompleted/index.md | 8 ++++++++ .../api/webrequest/onerroroccurred/index.md | 8 ++++++++ .../api/webrequest/onheadersreceived/index.md | 8 ++++++++ .../api/webrequest/onresponsestarted/index.md | 8 ++++++++ .../webextensions/api/webrequest/onsendheaders/index.md | 8 ++++++++ 13 files changed, 83 insertions(+), 2 deletions(-) diff --git a/files/en-us/mozilla/add-ons/webextensions/api/scripting/executescript/index.md b/files/en-us/mozilla/add-ons/webextensions/api/scripting/executescript/index.md index 22e8f83d3554983..9460cde14fe6904 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/scripting/executescript/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/scripting/executescript/index.md @@ -52,6 +52,9 @@ The promise is rejected if the injection fails, such as when the injection targe Each `InjectionResult` object has these properties: + +- `documentId` + - : `string`. The document associated with the injection. - `frameId` - : `number`. The frame ID associated with the injection. - `result` {{optional_inline}} diff --git a/files/en-us/mozilla/add-ons/webextensions/api/scripting/injectiontarget/index.md b/files/en-us/mozilla/add-ons/webextensions/api/scripting/injectiontarget/index.md index 6d6cc7abf5b6622..752d59f283e470f 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/scripting/injectiontarget/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/scripting/injectiontarget/index.md @@ -15,8 +15,11 @@ Values of this type are objects. They contain these properties: - `allFrames` {{optional_inline}} - : `boolean`. Whether the script or CSS is injected into all frames within the tab. Defaults to `false`. Cannot be `true` if `frameIds` is specified. +- `documentIds` {{optional_inline}} + - : `array` of `string`. The IDs of the documents to inject into. Must not be specified if `frameIds` is set. + - `frameIds` {{optional_inline}} - - : `array` of `number`. Array of the IDs of the frames to inject into. + - : `array` of `number`. Array of the IDs of the frames to inject into. Must not be specified if `documentIds` is set. - `tabId` - : `number`. The ID of the tab to inject into. diff --git a/files/en-us/mozilla/add-ons/webextensions/api/tabs/connect/index.md b/files/en-us/mozilla/add-ons/webextensions/api/tabs/connect/index.md index e4f4f0e208541fe..4879a5feec98d95 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/tabs/connect/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/tabs/connect/index.md @@ -27,6 +27,8 @@ browser.tabs.connect( - : `integer`. ID of the tab whose content scripts we want to connect to. - `connectInfo` {{optional_inline}} - : An object with the following properties: + - `documentId` {{optional_inline}} + - : `string`. Open a port to a specific document identified by `documentId` instead of all frames in the tab. - `name` {{optional_inline}} - : `string`. Will be passed into {{WebExtAPIRef("runtime.onConnect")}} event listeners in content scripts belonging to this extension and running in the specified tab. - `frameId` {{optional_inline}} diff --git a/files/en-us/mozilla/add-ons/webextensions/api/tabs/sendmessage/index.md b/files/en-us/mozilla/add-ons/webextensions/api/tabs/sendmessage/index.md index 5e12f5346a40025..90809e56e1c0f4e 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/tabs/sendmessage/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/tabs/sendmessage/index.md @@ -33,6 +33,8 @@ const sending = browser.tabs.sendMessage( - : `any`. An object that can be serialized (see [Data cloning algorithm](/en-US/docs/Mozilla/Add-ons/WebExtensions/Chrome_incompatibilities#data_cloning_algorithm)). - `options` {{optional_inline}} - : `object`. + - `documentId` {{optional_inline}} + - : `string`. Send a message to a specific document identified by `documentId` instead of all frames in the tab. - `frameId` {{optional_inline}} - : `integer`. Sends the message to a specific frame identified by `frameId` instead of all frames in the tab. Whether the content script is executed in all frames depends on the `all_frames` setting in the [`content_scripts`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts) section of `manifest.json`. diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onauthrequired/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onauthrequired/index.md index 17cb6e6135c4bd3..2e71d16ef438873 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onauthrequired/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onauthrequired/index.md @@ -104,11 +104,16 @@ Events have three functions: - : `string`. The server's [hostname](https://en.wikipedia.org/wiki/Hostname#Internet_hostnames). - `port` - : `integer`. The server's port number. - +- `documentId` {{optional_inline}} + - : `string`. The UUID of the document making the request. +- `documentLifecycle` + - : `string`. The lifecycle the document is in. Returns the values `"prerender"`, `"active"`, `"cached"`, or `"pending_deletion"`. - `cookieStoreId` - : `string`. If the request is from a tab open in a contextual identity, the cookie store ID of the contextual identity. See [Work with contextual identities](/en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_contextual_identities) for more information. - `frameId` - : `integer`. This is `0` if the request occurs in the main frame; a positive value is the ID of a subframe where the request happens. If the document of a (sub-)frame is loaded (`type` is `main_frame` or `sub_frame`), `frameId` indicates this frame's ID, not the outer frame's ID. Frame IDs are unique within a tab. +- `frameType` + - : `string`. The type of frame the request occurred in. Returns the values `"outermost_frame"`, `"fenced_frame"`, or `"sub_frame"`. - `incognito` - : `boolean`. Whether the request is from a private browsing window. - `isProxy` @@ -117,6 +122,8 @@ Events have three functions: > `webRequest.onAuthRequired` is only called for HTTP and HTTPS/TLS proxy servers requiring authentication, not for SOCKS proxy servers requiring authentication. - `method` - : `string`. Standard HTTP method (For example, `"GET"` or `"POST"`). +- `parentDocumentId`{{optional_inline}} + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. - `parentFrameId` - : `integer`. ID of the frame that contains the frame that sent the request. Set to `-1` if no parent frame exists. - `proxyInfo` diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforeredirect/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforeredirect/index.md index 18dc0e7aebbbb86..caa7da6eac2fb1d 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforeredirect/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforeredirect/index.md @@ -50,12 +50,18 @@ Events have three functions: ### details +- `documentId` {{optional_inline}} + - : `string`. The UUID of the document making the request. +- `documentLifecycle` + - : `string`. The lifecycle the document is in. Returns the values `"prerender"`, `"active"`, `"cached"`, or `"pending_deletion"`. - `cookieStoreId` - : `string`. If the request is from a tab open in a contextual identity, the cookie store ID of the contextual identity. See [Work with contextual identities](/en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_contextual_identities) for more information. - `documentUrl` - : `string`. URL of the document in which the resource will be loaded. For example, if the web page at "https\://example.com" contains an image or an iframe, then the `documentUrl` for the image or iframe will be "https\://example.com". For a top-level document, `documentUrl` is undefined. - `frameId` - : `integer`. Zero if the request happens in the main frame; a positive value is the ID of a subframe in which the request happens. If the document of a (sub-)frame is loaded (`type` is `main_frame` or `sub_frame`), `frameId` indicates the ID of this frame, not the ID of the outer frame. Frame IDs are unique within a tab. +- `frameType` + - : `string`. The type of frame the request occurred in. Returns the values `"outermost_frame"`, `"fenced_frame"`, or `"sub_frame"`. - `fromCache` - : `boolean`. Indicates if this response was fetched from disk cache. - `incognito` @@ -69,6 +75,8 @@ Events have three functions: The `originUrl` is often but not always the same as the `documentUrl`. For example, if a page contains an iframe, and the iframe contains a link that loads a new document into the iframe, then the `documentUrl` for the resulting request will be the iframe's parent document, but the `originUrl` will be the URL of the document in the iframe that contained the link. +- `parentDocumentId`{{optional_inline}} + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. - `parentFrameId` - : `integer`. ID of the frame that contains the frame which sent the request. Set to -1 if no parent frame exists. - `proxyInfo` diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforerequest/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforerequest/index.md index 92c9d1fe11d0a2a..9a5a8bbc621a888 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforerequest/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforerequest/index.md @@ -64,6 +64,10 @@ Events have three functions: ### details +- `documentId` {{optional_inline}} + - : `string`. The UUID of the document making the request. +- `documentLifecycle` + - : `string`. The lifecycle the document is in. Returns the values `"prerender"`, `"active"`, `"cached"`, or `"pending_deletion"`. - `cookieStoreId` - : `string`. If the request is from a tab open in a contextual identity, the cookie store ID of the contextual identity. See [Work with contextual identities](/en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_contextual_identities) for more information. - `documentUrl` @@ -77,6 +81,8 @@ Events have three functions: - `frameId` - : `integer`. Zero if the request happens in the main frame; a positive value is the ID of a subframe in which the request happens. If the document of a (sub-)frame is loaded (`type` is `main_frame` or `sub_frame`), `frameId` indicates the ID of this frame, not the ID of the outer frame. Frame IDs are unique within a tab. +- `frameType` + - : `string`. The type of frame the request occurred in. Returns the values `"outermost_frame"`, `"fenced_frame"`, or `"sub_frame"`. - `incognito` - : `boolean`. Whether the request is from a private browsing window. - `method` @@ -86,6 +92,8 @@ Events have three functions: The `originUrl` is often but not always the same as the `documentUrl`. For example, if a page contains an iframe, and the iframe contains a link that loads a new document into the iframe, then the `documentUrl` for the resulting request will be the iframe's parent document, but the `originUrl` will be the URL of the document in the iframe that contained the link. +- `parentDocumentId`{{optional_inline}} + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. - `parentFrameId` - : `integer`. ID of the frame that contains the frame which sent the request. Set to -1 if no parent frame exists. - `proxyInfo` diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforesendheaders/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforesendheaders/index.md index 27175beed65e3ee..973f512a9a64f40 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforesendheaders/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforesendheaders/index.md @@ -75,6 +75,10 @@ Events have three functions: ### details +- `documentId` {{optional_inline}} + - : `string`. The UUID of the document making the request. +- `documentLifecycle` + - : `string`. The lifecycle the document is in. Returns the values `"prerender"`, `"active"`, `"cached"`, or `"pending_deletion"`. - `cookieStoreId` - : `string`. If the request is from a tab open in a contextual identity, the cookie store ID of the contextual identity. See [Work with contextual identities](/en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_contextual_identities) for more information. - `documentUrl` @@ -87,6 +91,8 @@ Events have three functions: - : `integer`. The `frameId` of the document. `details.frameAncestors[0].frameId` is the same as `details.parentFrameId`. - `frameId` - : `integer`. Zero if the request happens in the main frame; a positive value is the ID of a subframe in which the request happens. If the document of a (sub-)frame is loaded (`type` is `main_frame` or `sub_frame`), `frameId` indicates the ID of this frame, not the ID of the outer frame. Frame IDs are unique within a tab. +- `frameType` + - : `string`. The type of frame the request occurred in. Returns the values `"outermost_frame"`, `"fenced_frame"`, or `"sub_frame"`. - `incognito` - : `boolean`. Whether the request is from a private browsing window. - `method` @@ -96,6 +102,8 @@ Events have three functions: The `originUrl` is often but not always the same as the `documentUrl`. For example, if a page contains an iframe, and the iframe contains a link that loads a new document into the iframe, then the `documentUrl` for the resulting request will be the iframe's parent document, but the `originUrl` will be the URL of the document in the iframe that contained the link. +- `parentDocumentId`{{optional_inline}} + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. - `parentFrameId` - : `integer`. ID of the frame that contains the frame which sent the request. Set to -1 if no parent frame exists. - `proxyInfo` diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/oncompleted/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/oncompleted/index.md index 35d2e63f1b75e69..722052c660a1301 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/oncompleted/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/oncompleted/index.md @@ -50,12 +50,18 @@ Events have three functions: ### details +- `documentId` {{optional_inline}} + - : `string`. The UUID of the document making the request. +- `documentLifecycle` + - : `string`. The lifecycle the document is in. Returns the values `"prerender"`, `"active"`, `"cached"`, or `"pending_deletion"`. - `cookieStoreId` - : `string`. If the request is from a tab open in a contextual identity, the cookie store ID of the contextual identity. See [Work with contextual identities](/en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_contextual_identities) for more information. - `documentUrl` - : `string`. URL of the document in which the resource will be loaded. For example, if the web page at "https\://example.com" contains an image or an iframe, then the `documentUrl` for the image or iframe will be "https\://example.com". For a top-level document, `documentUrl` is undefined. - `frameId` - : `integer`. Zero if the request happens in the main frame; a positive value is the ID of a subframe in which the request happens. If the document of a (sub-)frame is loaded (`type` is `main_frame` or `sub_frame`), `frameId` indicates the ID of this frame, not the ID of the outer frame. Frame IDs are unique within a tab. +- `frameType` + - : `string`. The type of frame the request occurred in. Returns the values `"outermost_frame"`, `"fenced_frame"`, or `"sub_frame"`. - `fromCache` - : `boolean`. Indicates if this response was fetched from disk cache. - `incognito` @@ -69,6 +75,8 @@ Events have three functions: The `originUrl` is often but not always the same as the `documentUrl`. For example, if a page contains an iframe, and the iframe contains a link that loads a new document into the iframe, then the `documentUrl` for the resulting request will be the iframe's parent document, but the `originUrl` will be the URL of the document in the iframe that contained the link. +- `parentDocumentId`{{optional_inline}} + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. - `parentFrameId` - : `integer`. ID of the frame that contains the frame which sent the request. Set to -1 if no parent frame exists. - `proxyInfo` diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onerroroccurred/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onerroroccurred/index.md index 11392b2e771c743..689edd4e9bb628f 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onerroroccurred/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onerroroccurred/index.md @@ -50,6 +50,10 @@ Events have three functions: ### details +- `documentId` {{optional_inline}} + - : `string`. The UUID of the document making the request. +- `documentLifecycle` + - : `string`. The lifecycle the document is in. Returns the values `"prerender"`, `"active"`, `"cached"`, or `"pending_deletion"`. - `cookieStoreId` - : `string`. If the request is from a tab open in a contextual identity, the cookie store ID of the contextual identity. See [Work with contextual identities](/en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_contextual_identities) for more information. - `documentUrl` @@ -58,6 +62,8 @@ Events have three functions: - : `string`. The error description. This string is an internal error string, may vary from one browser to another, and is not guaranteed to stay the same between releases. - `frameId` - : `integer`. Zero if the request happens in the main frame; a positive value is the ID of a subframe in which the request happens. If the document of a (sub-)frame is loaded (`type` is `main_frame` or `sub_frame`), `frameId` indicates the ID of this frame, not the ID of the outer frame. Frame IDs are unique within a tab. +- `frameType` + - : `string`. The type of frame the request occurred in. Returns the values `"outermost_frame"`, `"fenced_frame"`, or `"sub_frame"`. - `fromCache` - : `boolean`. Indicates if this response was fetched from disk cache. - `incognito` @@ -71,6 +77,8 @@ Events have three functions: The `originUrl` is often but not always the same as the `documentUrl`. For example, if a page contains an iframe, and the iframe contains a link that loads a new document into the iframe, then the `documentUrl` for the resulting request will be the iframe's parent document, but the `originUrl` will be the URL of the document in the iframe that contained the link. +- `parentDocumentId`{{optional_inline}} + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. - `parentFrameId` - : `integer`. ID of the frame that contains the frame which sent the request. Set to -1 if no parent frame exists. - `proxyInfo` diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onheadersreceived/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onheadersreceived/index.md index 190fad403cc9cd2..b6584808adb050e 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onheadersreceived/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onheadersreceived/index.md @@ -61,6 +61,10 @@ Events have three functions: ### details +- `documentId` {{optional_inline}} + - : `string`. The UUID of the document making the request. +- `documentLifecycle` + - : `string`. The lifecycle the document is in. Returns the values `"prerender"`, `"active"`, `"cached"`, or `"pending_deletion"`. - `cookieStoreId` - : `string`. If the request is from a tab open in a contextual identity, the cookie store ID of the contextual identity. See [Work with contextual identities](/en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_contextual_identities) for more information. - `documentUrl` @@ -74,6 +78,8 @@ Events have three functions: - `frameId` - : `integer`. Zero if the request happens in the main frame; a positive value is the ID of a subframe in which the request happens. If the document of a (sub-)frame is loaded (`type` is `main_frame` or `sub_frame`), `frameId` indicates the ID of this frame, not the ID of the outer frame. Frame IDs are unique within a tab. +- `frameType` + - : `string`. The type of frame the request occurred in. Returns the values `"outermost_frame"`, `"fenced_frame"`, or `"sub_frame"`. - `fromCache` - : `boolean`. Whether the response is fetched from disk cache. - `incognito` @@ -87,6 +93,8 @@ Events have three functions: The `originUrl` is often but not always the same as the `documentUrl`. For example, if a page contains an iframe, and the iframe contains a link that loads a new document into the iframe, then the `documentUrl` for the resulting request is the iframe's parent document, but the `originUrl` is the URL of the document in the iframe that contained the link. +- `parentDocumentId`{{optional_inline}} + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. - `parentFrameId` - : `integer`. ID of the frame that contains the frame that sent the request. Set to -1 if no parent frame exists. - `proxyInfo` diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onresponsestarted/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onresponsestarted/index.md index 304a39b22aa18b9..736d606583f77a2 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onresponsestarted/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onresponsestarted/index.md @@ -50,12 +50,18 @@ Events have three functions: ### details +- `documentId` {{optional_inline}} + - : `string`. The UUID of the document making the request. +- `documentLifecycle` + - : `string`. The lifecycle the document is in. Returns the values `"prerender"`, `"active"`, `"cached"`, or `"pending_deletion"`. - `cookieStoreId` - : `string`. If the request is from a tab open in a contextual identity, the cookie store ID of the contextual identity. See [Work with contextual identities](/en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_contextual_identities) for more information. - `documentUrl` - : `string`. URL of the document in which the resource will be loaded. For example, if the web page at "https\://example.com" contains an image or an iframe, then the `documentUrl` for the image or iframe will be "https\://example.com". For a top-level document, `documentUrl` is undefined. - `frameId` - : `integer`. Zero if the request happens in the main frame; a positive value is the ID of a subframe in which the request happens. If the document of a (sub-)frame is loaded (`type` is `main_frame` or `sub_frame`), `frameId` indicates the ID of this frame, not the ID of the outer frame. Frame IDs are unique within a tab. +- `frameType` + - : `string`. The type of frame the request occurred in. Returns the values `"outermost_frame"`, `"fenced_frame"`, or `"sub_frame"`. - `fromCache` - : `boolean`. Indicates if this response was fetched from disk cache. - `incognito` @@ -69,6 +75,8 @@ Events have three functions: The `originUrl` is often but not always the same as the `documentUrl`. For example, if a page contains an iframe, and the iframe contains a link that loads a new document into the iframe, then the `documentUrl` for the resulting request will be the iframe's parent document, but the `originUrl` will be the URL of the document in the iframe that contained the link. +- `parentDocumentId`{{optional_inline}} + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. - `parentFrameId` - : `integer`. ID of the frame that contains the frame which sent the request. Set to -1 if no parent frame exists. - `proxyInfo` diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onsendheaders/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onsendheaders/index.md index 6143352e7bfd9db..1c4e5b583086e1b 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onsendheaders/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onsendheaders/index.md @@ -50,12 +50,18 @@ Events have three functions: ### details +- `documentId` {{optional_inline}} + - : `string`. The UUID of the document making the request. +- `documentLifecycle` + - : `string`. The lifecycle the document is in. Returns the values `"prerender"`, `"active"`, `"cached"`, or `"pending_deletion"`. - `cookieStoreId` - : `string`. If the request is from a tab open in a contextual identity, the cookie store ID of the contextual identity. See [Work with contextual identities](/en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_contextual_identities) for more information. - `documentUrl` - : `string`. URL of the document in which the resource will be loaded. For example, if the web page at "https\://example.com" contains an image or an iframe, then the `documentUrl` for the image or iframe will be "https\://example.com". For a top-level document, `documentUrl` is undefined. - `frameId` - : `integer`. Zero if the request happens in the main frame; a positive value is the ID of a subframe in which the request happens. If the document of a (sub-)frame is loaded (`type` is `main_frame` or `sub_frame`), `frameId` indicates the ID of this frame, not the ID of the outer frame. Frame IDs are unique within a tab +- `frameType` + - : `string`. The type of frame the request occurred in. Returns the values `"outermost_frame"`, `"fenced_frame"`, or `"sub_frame"`. - `incognito` - : `boolean`. Whether the request is from a private browsing window. - `method` @@ -65,6 +71,8 @@ Events have three functions: The `originUrl` is often but not always the same as the `documentUrl`. For example, if a page contains an iframe, and the iframe contains a link that loads a new document into the iframe, then the `documentUrl` for the resulting request will be the iframe's parent document, but the `originUrl` will be the URL of the document in the iframe that contained the link. +- `parentDocumentId`{{optional_inline}} + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. - `parentFrameId` - : `integer`. ID of the frame that contains the frame which sent the request. Set to -1 if no parent frame exists. - `proxyInfo` From cdca435c0f38dfa0eb8811e916d0b5e605ee375d Mon Sep 17 00:00:00 2001 From: rebloor Date: Fri, 16 Jan 2026 04:46:05 +1300 Subject: [PATCH 2/3] Apply linter corrections Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../webextensions/api/webrequest/onauthrequired/index.md | 2 +- .../webextensions/api/webrequest/onbeforeredirect/index.md | 2 +- .../webextensions/api/webrequest/onbeforerequest/index.md | 2 +- .../webextensions/api/webrequest/onbeforesendheaders/index.md | 2 +- .../add-ons/webextensions/api/webrequest/oncompleted/index.md | 2 +- .../webextensions/api/webrequest/onerroroccurred/index.md | 2 +- .../webextensions/api/webrequest/onheadersreceived/index.md | 2 +- .../webextensions/api/webrequest/onresponsestarted/index.md | 2 +- .../add-ons/webextensions/api/webrequest/onsendheaders/index.md | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onauthrequired/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onauthrequired/index.md index 2e71d16ef438873..b8ae3791126f925 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onauthrequired/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onauthrequired/index.md @@ -123,7 +123,7 @@ Events have three functions: - `method` - : `string`. Standard HTTP method (For example, `"GET"` or `"POST"`). - `parentDocumentId`{{optional_inline}} - - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. - `parentFrameId` - : `integer`. ID of the frame that contains the frame that sent the request. Set to `-1` if no parent frame exists. - `proxyInfo` diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforeredirect/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforeredirect/index.md index caa7da6eac2fb1d..cfa3c66bb6b8c75 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforeredirect/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforeredirect/index.md @@ -76,7 +76,7 @@ Events have three functions: The `originUrl` is often but not always the same as the `documentUrl`. For example, if a page contains an iframe, and the iframe contains a link that loads a new document into the iframe, then the `documentUrl` for the resulting request will be the iframe's parent document, but the `originUrl` will be the URL of the document in the iframe that contained the link. - `parentDocumentId`{{optional_inline}} - - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. - `parentFrameId` - : `integer`. ID of the frame that contains the frame which sent the request. Set to -1 if no parent frame exists. - `proxyInfo` diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforerequest/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforerequest/index.md index 9a5a8bbc621a888..6b46f933e4c04e9 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforerequest/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforerequest/index.md @@ -93,7 +93,7 @@ Events have three functions: The `originUrl` is often but not always the same as the `documentUrl`. For example, if a page contains an iframe, and the iframe contains a link that loads a new document into the iframe, then the `documentUrl` for the resulting request will be the iframe's parent document, but the `originUrl` will be the URL of the document in the iframe that contained the link. - `parentDocumentId`{{optional_inline}} - - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. - `parentFrameId` - : `integer`. ID of the frame that contains the frame which sent the request. Set to -1 if no parent frame exists. - `proxyInfo` diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforesendheaders/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforesendheaders/index.md index 973f512a9a64f40..6690e32968819f9 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforesendheaders/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onbeforesendheaders/index.md @@ -103,7 +103,7 @@ Events have three functions: The `originUrl` is often but not always the same as the `documentUrl`. For example, if a page contains an iframe, and the iframe contains a link that loads a new document into the iframe, then the `documentUrl` for the resulting request will be the iframe's parent document, but the `originUrl` will be the URL of the document in the iframe that contained the link. - `parentDocumentId`{{optional_inline}} - - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. - `parentFrameId` - : `integer`. ID of the frame that contains the frame which sent the request. Set to -1 if no parent frame exists. - `proxyInfo` diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/oncompleted/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/oncompleted/index.md index 722052c660a1301..eb9ebd1d77300c8 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/oncompleted/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/oncompleted/index.md @@ -76,7 +76,7 @@ Events have three functions: The `originUrl` is often but not always the same as the `documentUrl`. For example, if a page contains an iframe, and the iframe contains a link that loads a new document into the iframe, then the `documentUrl` for the resulting request will be the iframe's parent document, but the `originUrl` will be the URL of the document in the iframe that contained the link. - `parentDocumentId`{{optional_inline}} - - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. - `parentFrameId` - : `integer`. ID of the frame that contains the frame which sent the request. Set to -1 if no parent frame exists. - `proxyInfo` diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onerroroccurred/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onerroroccurred/index.md index 689edd4e9bb628f..9c7655c54f27b73 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onerroroccurred/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onerroroccurred/index.md @@ -78,7 +78,7 @@ Events have three functions: The `originUrl` is often but not always the same as the `documentUrl`. For example, if a page contains an iframe, and the iframe contains a link that loads a new document into the iframe, then the `documentUrl` for the resulting request will be the iframe's parent document, but the `originUrl` will be the URL of the document in the iframe that contained the link. - `parentDocumentId`{{optional_inline}} - - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. - `parentFrameId` - : `integer`. ID of the frame that contains the frame which sent the request. Set to -1 if no parent frame exists. - `proxyInfo` diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onheadersreceived/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onheadersreceived/index.md index b6584808adb050e..609a00afff7bae0 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onheadersreceived/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onheadersreceived/index.md @@ -94,7 +94,7 @@ Events have three functions: The `originUrl` is often but not always the same as the `documentUrl`. For example, if a page contains an iframe, and the iframe contains a link that loads a new document into the iframe, then the `documentUrl` for the resulting request is the iframe's parent document, but the `originUrl` is the URL of the document in the iframe that contained the link. - `parentDocumentId`{{optional_inline}} - - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. - `parentFrameId` - : `integer`. ID of the frame that contains the frame that sent the request. Set to -1 if no parent frame exists. - `proxyInfo` diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onresponsestarted/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onresponsestarted/index.md index 736d606583f77a2..be2e9e59fe7d346 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onresponsestarted/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onresponsestarted/index.md @@ -76,7 +76,7 @@ Events have three functions: The `originUrl` is often but not always the same as the `documentUrl`. For example, if a page contains an iframe, and the iframe contains a link that loads a new document into the iframe, then the `documentUrl` for the resulting request will be the iframe's parent document, but the `originUrl` will be the URL of the document in the iframe that contained the link. - `parentDocumentId`{{optional_inline}} - - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. - `parentFrameId` - : `integer`. ID of the frame that contains the frame which sent the request. Set to -1 if no parent frame exists. - `proxyInfo` diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onsendheaders/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onsendheaders/index.md index 1c4e5b583086e1b..725c4edd234a002 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onsendheaders/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webrequest/onsendheaders/index.md @@ -72,7 +72,7 @@ Events have three functions: The `originUrl` is often but not always the same as the `documentUrl`. For example, if a page contains an iframe, and the iframe contains a link that loads a new document into the iframe, then the `documentUrl` for the resulting request will be the iframe's parent document, but the `originUrl` will be the URL of the document in the iframe that contained the link. - `parentDocumentId`{{optional_inline}} - - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. - `parentFrameId` - : `integer`. ID of the frame that contains the frame which sent the request. Set to -1 if no parent frame exists. - `proxyInfo` From ede6a30fcc70b25a872f318e4859cee3f9d148b1 Mon Sep 17 00:00:00 2001 From: rebloor Date: Fri, 16 Jan 2026 04:52:11 +1300 Subject: [PATCH 3/3] Apply suggestion from @github-actions[bot] Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../add-ons/webextensions/api/scripting/executescript/index.md | 1 - 1 file changed, 1 deletion(-) diff --git a/files/en-us/mozilla/add-ons/webextensions/api/scripting/executescript/index.md b/files/en-us/mozilla/add-ons/webextensions/api/scripting/executescript/index.md index 9460cde14fe6904..ecd4c343d709044 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/scripting/executescript/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/scripting/executescript/index.md @@ -52,7 +52,6 @@ The promise is rejected if the injection fails, such as when the injection targe Each `InjectionResult` object has these properties: - - `documentId` - : `string`. The document associated with the injection. - `frameId`