Use the browser.webNavigation API to receive notifications about the status of navigation requests in-flight.

Permissions: webNavigation

Not allowed in: Content scripts, Devtools pages

_GetAllFramesDetails
_GetAllFramesReturnDetails
_GetFrameDetails
_GetFrameReturnDetails
_OnBeforeNavigateDetails
_OnCommittedDetails
_OnCompletedDetails
_OnCreatedNavigationTargetDetails
_OnDOMContentLoadedDetails
_OnErrorOccurredDetails
_OnHistoryStateUpdatedDetails
_OnReferenceFragmentUpdatedDetails
_OnTabReplacedDetails
_WebNavigationOnBeforeNavigateEvent
_WebNavigationOnCommittedEvent
_WebNavigationOnCompletedEvent
_WebNavigationOnCreatedNavigationTargetEvent
_WebNavigationOnDOMContentLoadedEvent
_WebNavigationOnErrorOccurredEvent
_WebNavigationOnHistoryStateUpdatedEvent
_WebNavigationOnReferenceFragmentUpdatedEvent
EventUrlFilters
TransitionQualifier
TransitionType
onBeforeNavigate
onCommitted
onCompleted
onCreatedNavigationTarget
onDOMContentLoaded
onErrorOccurred
onHistoryStateUpdated
onReferenceFragmentUpdated
onTabReplaced
getAllFrames
getFrame
TransitionQualifier:
    | "client_redirect"
    | "server_redirect"
    | "forward_back"
    | "from_address_bar"
TransitionType:
    | "link"
    | "typed"
    | "auto_bookmark"
    | "auto_subframe"
    | "manual_subframe"
    | "generated"
    | "start_page"
    | "form_submit"
    | "reload"
    | "keyword"
    | "keyword_generated"

Cause of the navigation. The same transition types as defined in the history API are used. These are the same transition types as defined in the history API except with "start_page" in place of "auto_toplevel" (for backwards compatibility).

Fired when a navigation is about to occur.

Fired when a navigation is committed. The document (and the resources it refers to, such as images and subframes) might still be downloading, but at least part of the document has been received from the server and the browser has decided to switch to the new document.

Fired when a document, including the resources it refers to, is completely loaded and initialized.

Fired when a new window, or a new tab in an existing window, is created to host a navigation.

Fired when the page's DOM is fully constructed, but the referenced resources may not finish loading.

Fired when an error occurs and the navigation is aborted. This can happen if either a network error occurred, or the user aborted the navigation.

Fired when the frame's history was updated to a new URL. All future events for that frame will use the updated URL.

Fired when the reference fragment of a frame was updated. All future events for that frame will use the updated URL.

onTabReplaced: WebExtEvent<(details: _OnTabReplacedDetails) => void>

Fired when the contents of the tab is replaced by a different (usually previously pre-rendered) tab.

  • Retrieves information about the given frame. A frame refers to an <iframe> or a <frame> of a web page and is identified by a tab ID and a frame ID.

    Parameters

    • details: _GetFrameDetails

      Information about the frame to retrieve information about.

    Returns Promise<_GetFrameReturnDetails>