webNavigation.onCompleted

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

Syntax

browser.webNavigation.onCompleted.addListener(function(
  details // object
) {...})
browser.webNavigation.onCompleted.removeListener(listener)
browser.webNavigation.onCompleted.hasListener(listener)

Events have three functions:

addListener(callback)
Adds a listener to this event.
removeListener(listener)
Stop listening to this event. The listener argument is the listener to remove.
hasListener(listener)
Check whether listener is registered for this event. Returns true if it is listening, false otherwise.

addListener syntax

Parameters

callback

Function that will be called when this event occurs. The function will be passed the following arguments:

details
object.

Additional objects

details

tabId
integer. The ID of the tab in which the navigation occurs.
url
string.
processId
integer. The ID of the process runs the renderer for this tab.
frameId
integer. 0 indicates the navigation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique within a tab.
timeStamp
number. The time when the document finished loading, in milliseconds since the epoch.

Browser compatibility

EdgeFirefoxChromeOpera
Basic support?45.0Yes33
Firefox
Basic support48.0

Examples

Acknowledgements

This API is based on Chromium's chrome.webNavigation API. This documentation is derived from web_navigation.json in the Chromium code.

Document Tags and Contributors

 Contributors to this page: wbamberg
 Last updated by: wbamberg,