From 663252c2f1b18cfd738881666237e0f0d3ed3d51 Mon Sep 17 00:00:00 2001 From: Richard Bloor Date: Tue, 16 Sep 2025 05:09:58 +1200 Subject: [PATCH] Issue-27012 webextension.api.webNavigation Chrome properties --- .../api/webnavigation/getallframes/index.md | 16 ++++++++--- .../api/webnavigation/getframe/index.md | 22 +++++++++++---- .../webnavigation/onbeforenavigate/index.md | 11 ++++++-- .../api/webnavigation/oncommitted/index.md | 27 ++++++++++--------- .../api/webnavigation/oncompleted/index.md | 12 +++++++-- .../oncreatednavigationtarget/index.md | 4 +-- .../webnavigation/ondomcontentloaded/index.md | 12 +++++++-- .../webnavigation/onerroroccurred/index.md | 12 +++++++-- .../onhistorystateupdated/index.md | 16 ++++++++--- .../onreferencefragmentupdated/index.md | 16 ++++++++--- 10 files changed, 108 insertions(+), 40 deletions(-) diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/getallframes/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/getallframes/index.md index 213f3c16e016a44..2aa9329473c0ebf 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/getallframes/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/getallframes/index.md @@ -31,14 +31,22 @@ A [`Promise`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) that - `errorOccurred` - : `boolean`. True if the last navigation in this frame was interrupted by an error, i.e., the {{WebExtAPIRef("webNavigation.onErrorOccurred", "onErrorOccurred")}} event fired. -- `processId` {{optional_inline}} {{deprecated_inline}} - - : `integer`. This value is not set in modern browsers. When it was set, it represented the ID of the process running the renderer for this tab. +- `url` + - : `string`. The URL associated with this frame. - `frameId` - : `integer`. The ID of the frame. If this is the main frame, then `frameId` is zero. +- `frameType` + - : `string`. The type of frame. Returns the values `"outermost_frame"`, `"fenced_frame"`, or `"sub_frame"` . - `parentFrameId` - : `integer`. ID of this frame's parent. This is -1 if there is no parent frame: that is, if this frame is the top-level browsing context in the tab. -- `url` - - : `string`. The URL currently associated with this frame. +- `documentId` + - : `string`. A UUID of the frame's document. +- `parentDocumentId` + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. +- `documentLifecycle` + - : `string`. The lifecycle the document is in. Returns the values `"prerender"`, `"active"`, `"cached"`, or `"pending_deletion"`. +- `processId` {{optional_inline}} {{deprecated_inline}} + - : `integer`. This value is not set in modern browsers. When it was set, it represented the ID of the process running the renderer for this tab. If the tab is discarded, the promise will instead resolve with a `null` value. If the specified tab could not be found, or some other error occurs, the promise will be rejected with an error message. diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/getframe/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/getframe/index.md index 9e271d63edf2126..4f2d26a210c4641 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/getframe/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/getframe/index.md @@ -21,24 +21,36 @@ let gettingFrame = browser.webNavigation.getFrame( ### Parameters - `details` - - : `object`. Information about the frame to retrieve information about. - - `tabId` + - : `object`. Information about the frame to retrieve information about. Must include one of `tabId`, `frameId`, or `documentId`. + - `tabId` {{optional_inline}} - : `integer`. The ID of the tab in which the frame is. - `processId` {{optional_inline}} {{deprecated_inline}} - : `integer`. This value is not set in modern browsers. When it was set, it represented the ID of the process running the renderer for this tab. - - `frameId` + - `frameId` {{optional_inline}} - : `integer`. The ID of the frame in the given tab. + - `documentId` {{optional_inline}} + - : `string`. The UUID of the frame's document. + +Must include one of ### Return value -A [`Promise`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) that will be fulfilled with an object containing the following properties: +A [`Promise`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) that is fulfilled with an object containing these properties: - `errorOccurred` - : `boolean`. True if the last navigation in this frame was interrupted by an error, i.e., the {{WebExtAPIRef("webNavigation.onErrorOccurred", "onErrorOccurred")}} event fired. - `url` - - : `string`. The URL currently associated with this frame, if the frame identified by `frameId` existed at one point in the tab identified by `tabId`. The fact that a URL is associated with a given `frameId` does not imply that the corresponding frame still exists. + - : `string`. The URL associated with this frame, if the frame identified by `frameId` existed at one point in the tab identified by `tabId`. The fact that a URL is associated with a given `frameId` does not imply that the corresponding frame still exists. +- `frameType` + - : `string`. The type of frame. Returns the values `"outermost_frame"`, `"fenced_frame"`, or `"sub_frame"` . - `parentFrameId` - : `integer`. ID of this frame's parent. This is -1 if there is no parent frame: that is, if this frame is the top-level browsing context in the tab. +- `documentId` + - : `string`. A UUID of the frame's document. +- `parentDocumentId` + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. +- `documentLifecycle` + - : `string`. The lifecycle the document is in. Returns the values `"prerender"`, `"active"`, `"cached"`, or `"pending_deletion"`. If the tab is discarded, the promise will instead resolve with a `null` value. If the specified tab or frame ID could not be found, or some other error occurs, the promise will be rejected with an error message. diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/onbeforenavigate/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/onbeforenavigate/index.md index eff542ed20a6a70..c1118e7bbb17af3 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/onbeforenavigate/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/onbeforenavigate/index.md @@ -48,14 +48,21 @@ Events have three functions: - : `integer`. The ID of the tab in which the navigation is about to occur. - `url` - : `string`. The URL to which the given frame will navigate. -- `processId` {{optional_inline}} {{deprecated_inline}} - - : `integer`. This value is not set in modern browsers. When it was set, it represented the ID of the process running the renderer for this tab. - `frameId` - : `integer`. Frame in which the navigation is about to occur. `0` indicates that navigation happens in the tab's top-level browsing context, not in a nested {{HTMLElement("iframe")}}. A positive value indicates that navigation happens in a nested iframe. Frame IDs are unique for a given tab and process. + frameType +- `frameType` + - : `string`. The type of frame. Returns the values `"outermost_frame"`, `"fenced_frame"`, or `"sub_frame"` . - `parentFrameId` - : `integer`. ID of this frame's parent. Set to `-1` if this is a top-level frame. +- `parentDocumentId` + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. +- `documentLifecycle` + - : `string`. The lifecycle the document is in. Returns the values `"prerender"`, `"active"`, `"cached"`, or `"pending_deletion"`. - `timeStamp` - : `number`. The time when the browser is about to start the navigation, in [milliseconds since the epoch](https://en.wikipedia.org/wiki/Unix_time). +- `processId` {{optional_inline}} {{deprecated_inline}} + - : `integer`. This value is not set in modern browsers. When it was set, it represented the ID of the process running the renderer for this tab. ## Examples diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/oncommitted/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/oncommitted/index.md index 9e7fb98a6cb0857..e8c38c8a7004250 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/oncommitted/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/oncommitted/index.md @@ -44,30 +44,31 @@ Events have three functions: ### details -- `documentId` - - : `string`. A UUID of the document loaded. -- `parentDocumentId` - - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. -- `documentLifecycle` - - : `string`. The lifecycle the document is in. Returns the values `"prerender"`, `"active"`, `"cached"`, and `"pending_deletion"`. - `tabId` - : `integer`. The ID of the tab in which the navigation is about to occur. - `url` - - : `string`. The URL to which the given frame will navigate. -- `processId` {{optional_inline}} {{deprecated_inline}} - - : `integer`. This value is not set in modern browsers. When it was set, it represented the ID of the process running the renderer for this tab. + - : `string`. The URL to which the frame will navigate. - `frameId` - : `integer`. Frame in which the navigation will occur. `0` indicates that navigation happens in the tab's top-level browsing context, not in a nested {{HTMLElement("iframe")}}. A positive value indicates that navigation happens in a nested iframe. Frame IDs are unique for a given tab and process. +- `frameType` + - : `string`. The type of frame the navigation occurred in. Returns the values `"outermost_frame"` - `parentFrameId` - : `integer`. ID of this frame's parent. Set to `-1` if this is a top-level frame. -- `frameType` - - : `string`. The type of frame the navigation occurred in. Returns the values `"outermost_frame"`, `"fenced_frame"`, and `"sub_frame"`. -- `timeStamp` - - : `number`. The time that the navigation was committed, in [milliseconds since the epoch](https://en.wikipedia.org/wiki/Unix_time). + , `"fenced_frame"`, and `"sub_frame"`. +- `documentId` + - : `string`. A UUID of the document loaded. +- `parentDocumentId` + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. +- `documentLifecycle` + - : `string`. The lifecycle the document is in. Returns the values `"prerender"`, `"active"`, `"cached"`, and `"pending_deletion"`. - `transitionType` - : {{WebExtAPIRef("webNavigation.transitionType", "transitionType")}}. The reason for the navigation. (For example, `"link"` if the user clicked a link, or `"reload"` if the user reloaded the page.) - `transitionQualifiers` - : `Array` of {{WebExtAPIRef("webNavigation.transitionQualifier", "transitionQualifier")}}. Extra information about the navigation: for example, whether there was a server or client redirect. +- `timeStamp` + - : `number`. The time that the navigation was committed, in [milliseconds since the epoch](https://en.wikipedia.org/wiki/Unix_time). +- `processId` {{optional_inline}} {{deprecated_inline}} + - : `integer`. This value is not set in modern browsers. When it was set, it represented the ID of the process running the renderer for this tab. ## Examples diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/oncompleted/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/oncompleted/index.md index e6b8305d8c26a6e..c72ef5977abd4ed 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/oncompleted/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/oncompleted/index.md @@ -48,14 +48,22 @@ Events have three functions: - : `integer`. The ID of the tab in which the navigation has occurred. - `url` - : `string`. The URL to which the given frame has navigated. -- `processId` {{optional_inline}} {{deprecated_inline}} - - : `integer`. This value is not set in modern browsers. When it was set, it represented the ID of the process running the renderer for this tab. - `frameId` - : `integer`. Frame in which the navigation has occurred. `0` indicates that navigation happened in the tab's top-level browsing context, not in a nested {{HTMLElement("iframe")}}. A positive value indicates that navigation happened in a nested iframe. Frame IDs are unique for a given tab and process. +- `frameType` + - : `string`. The type of frame the navigation occurred in. Returns the values `"outermost_frame"`, `"fenced_frame"`, and `"sub_frame"`. - `parentFrameId` - : `integer`. ID of this frame's parent. Set to `-1` if this is a top-level frame. +- `documentId` + - : `string`. A UUID of the document loaded. +- `parentDocumentId` + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. +- `documentLifecycle` + - : `string`. The lifecycle the document is in. Returns the values `"prerender"`, `"active"`, `"cached"`, and `"pending_deletion"`. - `timeStamp` - : `number`. The time at which the page finished loading, in [milliseconds since the epoch](https://en.wikipedia.org/wiki/Unix_time). +- `processId` {{optional_inline}} {{deprecated_inline}} + - : `integer`. This value is not set in modern browsers. When it was set, it represented the ID of the process running the renderer for this tab. ## Examples diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/oncreatednavigationtarget/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/oncreatednavigationtarget/index.md index ea7088476803e74..e63f2c664a2da40 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/oncreatednavigationtarget/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/oncreatednavigationtarget/index.md @@ -53,8 +53,6 @@ Events have three functions: - `sourceFrameId` - : `integer`. ID of the frame from which the navigation is initiated. `0` indicates that the frame is the tab's top-level browsing context, not a nested {{HTMLElement("iframe")}}. A positive value indicates that navigation is initiated from a nested iframe. Frame IDs are unique for a given tab and process. -- `processId` {{optional_inline}} {{deprecated_inline}} - - : `integer`. This value is not set in modern browsers. When it was set, it represented the ID of the process the navigation originated from. - `sourceTabId` - : `integer`. The ID of the tab from which the navigation is initiated. For example, if the user opens a link in a new tab, this will be the ID of the tab containing the link. - `tabId` @@ -65,6 +63,8 @@ Events have three functions: - : `string`. The URL which will be loaded in the new tab. - `windowId` - : `number`. The ID of the window in which the new tab is created. +- `processId` {{optional_inline}} {{deprecated_inline}} + - : `integer`. This value is not set in modern browsers. When it was set, it represented the ID of the process the navigation originated from. ## Examples diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/ondomcontentloaded/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/ondomcontentloaded/index.md index 4c6e64de220f66a..4558886024e4138 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/ondomcontentloaded/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/ondomcontentloaded/index.md @@ -48,14 +48,22 @@ Events have three functions: - : `integer`. The ID of the tab in which the navigation has occurred. - `url` - : `string`. The URL to which the given frame has navigated. -- `processId` {{optional_inline}} {{deprecated_inline}} - - : `integer`. This value is not set in modern browsers. When it was set, it represented the ID of the process running the renderer for this tab. - `frameId` - : `integer`. Frame in which the navigation is occurring. `0` indicates that navigation happens in the tab's top-level browsing context, not in a nested {{HTMLElement("iframe")}}. A positive value indicates that navigation happens in a nested iframe. Frame IDs are unique for a given tab and process. +- `frameType` + - : `string`. The type of frame the navigation occurred in. Returns the values `"outermost_frame"`, `"fenced_frame"`, and `"sub_frame"`. - `parentFrameId` - : `integer`. ID of this frame's parent. Set to `-1` if this is a top-level frame. +- `documentId` + - : `string`. A UUID of the document loaded. +- `parentDocumentId` + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. +- `documentLifecycle` + - : `string`. The lifecycle the document is in. Returns the values `"prerender"`, `"active"`, `"cached"`, and `"pending_deletion"`. - `timeStamp` - : `number`. The time at which `DOMContentLoaded` was fired, in [milliseconds since the epoch](https://en.wikipedia.org/wiki/Unix_time). +- `processId` {{optional_inline}} {{deprecated_inline}} + - : `integer`. This value is not set in modern browsers. When it was set, it represented the ID of the process running the renderer for this tab. ## Examples diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/onerroroccurred/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/onerroroccurred/index.md index fdebbef8e945a6a..7b381bc8a7b0891 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/onerroroccurred/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/onerroroccurred/index.md @@ -42,8 +42,6 @@ Events have three functions: - : `integer`. The ID of the tab in which the navigation was happening. - `url` - : `string`. The URL to which the given frame was navigating. - - `processId` {{optional_inline}} {{deprecated_inline}} - - : `integer`. This value is never set in modern browsers. It used to represent the ID of the process running the renderer for this tab. - `frameId` - : `integer`. Frame in which the navigation was happening. @@ -53,10 +51,20 @@ Events have three functions: Frame IDs are unique for a given tab and process. + - `frameType` + - : `string`. The type of frame the navigation occurred in. Returns the values `"outermost_frame"`, `"fenced_frame"`, and `"sub_frame"`. - `parentFrameId` - : `integer`. ID of this frame's parent. Set to `-1` if this is a top-level frame. + - `documentId` + - : `string`. A UUID of the document loaded. + - `parentDocumentId` + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. + - `documentLifecycle` + - : `string`. The lifecycle the document is in. Returns the values `"prerender"`, `"active"`, `"cached"`, and `"pending_deletion"`. - `timeStamp` - : `number`. The time at which the error occurred, in [milliseconds since the epoch](https://en.wikipedia.org/wiki/Unix_time). + - `processId` {{optional_inline}} {{deprecated_inline}} + - : `integer`. This value is never set in modern browsers. It used to represent the ID of the process running the renderer for this tab. - `error` - : `string`. The error code. This is an internal error code, and is not guaranteed to stay the same or be consistent from one browser to another. diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/onhistorystateupdated/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/onhistorystateupdated/index.md index 2ca66ba394efbf4..435285c7a397965 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/onhistorystateupdated/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/onhistorystateupdated/index.md @@ -48,18 +48,26 @@ Events have three functions: - : `integer`. The ID of the tab in which the navigation is about to occur. - `url` - : `string`. The URL to which the given frame will navigate. -- `processId` {{optional_inline}} {{deprecated_inline}} - - : `integer`. This value is not set in modern browsers. When it was set, it represented the ID of the process running the renderer for this tab. - `frameId` - : `integer`. Frame in which the navigation will occur. `0` indicates that navigation happens in the tab's top-level browsing context, not in a nested {{HTMLElement("iframe")}}. A positive value indicates that navigation happens in a nested iframe. Frame IDs are unique for a given tab and process. +- `frameType` + - : `string`. The type of frame the navigation occurred in. Returns the values `"outermost_frame"`, `"fenced_frame"`, and `"sub_frame"`. - `parentFrameId` - : `integer`. ID of this frame's parent. Set to `-1` if this is a top-level frame. -- `timeStamp` - - : `number`. The time that the URL was changed by the history API, in [milliseconds since the epoch](https://en.wikipedia.org/wiki/Unix_time). +- `documentId` + - : `string`. A UUID of the document loaded. +- `parentDocumentId` + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. +- `documentLifecycle` + - : `string`. The lifecycle the document is in. Returns the values `"prerender"`, `"active"`, `"cached"`, and `"pending_deletion"`. - `transitionType` - : {{WebExtAPIRef("webNavigation.transitionType", "transitionType")}}. The reason for the navigation: for example, `"link"` if the user clicked a link. - `transitionQualifiers` - : `Array` of {{WebExtAPIRef("webNavigation.transitionQualifier", "transitionQualifier")}}. Extra information about the navigation: for example, whether there was a server or client redirect. +- `timeStamp` + - : `number`. The time that the URL was changed by the history API, in [milliseconds since the epoch](https://en.wikipedia.org/wiki/Unix_time). +- `processId` {{optional_inline}} {{deprecated_inline}} + - : `integer`. This value is not set in modern browsers. When it was set, it represented the ID of the process running the renderer for this tab. ## Examples diff --git a/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/onreferencefragmentupdated/index.md b/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/onreferencefragmentupdated/index.md index c25c7a062a817bd..a6766dd9d6c951a 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/onreferencefragmentupdated/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/webnavigation/onreferencefragmentupdated/index.md @@ -48,18 +48,26 @@ Events have three functions: - : `integer`. The ID of the tab in which the navigation is about to occur. - `url` - : `string`. The URL to which the given frame will navigate. -- `processId` {{optional_inline}} {{deprecated_inline}} - - : `integer`. This value is not set in modern browsers. When it was set, it represented the ID of the process running the renderer for this tab. - `frameId` - : `integer`. Frame in which the navigation will occur. `0` indicates that navigation happens in the tab's top-level browsing context, not in a nested {{HTMLElement("iframe")}}. A positive value indicates that navigation happens in a nested iframe. Frame IDs are unique for a given tab and process. +- `frameType` + - : `string`. The type of frame the navigation occurred in. Returns the values `"outermost_frame"`, `"fenced_frame"`, and `"sub_frame"`. - `parentFrameId` - : `integer`. ID of this frame's parent. Set to `-1` if this is a top-level frame. -- `timeStamp` - - : `number`. The time that the fragment identifier for the page was changed, in [milliseconds since the epoch](https://en.wikipedia.org/wiki/Unix_time). +- `documentId` + - : `string`. A UUID of the document loaded. +- `parentDocumentId` + - : `string`. A UUID of the parent document owning the frame. Not set if there is no parent. +- `documentLifecycle` + - : `string`. The lifecycle the document is in. Returns the values `"prerender"`, `"active"`, `"cached"`, and `"pending_deletion"`. - `transitionType` - : {{WebExtAPIRef("webNavigation.transitionType", "transitionType")}}. The reason for the navigation: for example, `"link"` if the user clicked a link. - `transitionQualifiers` - : `Array` of {{WebExtAPIRef("webNavigation.transitionQualifier", "transitionQualifier")}}. Extra information about the navigation: for example, whether there was a server or client redirect. +- `timeStamp` + - : `number`. The time that the fragment identifier for the page was changed, in [milliseconds since the epoch](https://en.wikipedia.org/wiki/Unix_time). +- `processId` {{optional_inline}} {{deprecated_inline}} + - : `integer`. This value is not set in modern browsers. When it was set, it represented the ID of the process running the renderer for this tab. ## Examples