webNavigation.getFrame()

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.

Syntax

browser.webNavigation.getFrame(
  details,                // object
  function(details) {...} // function
)

Parameters

details
object. Information about the frame to retrieve information about.
tabId
integer. The ID of the tab in which the frame is.
processId
integer. The ID of the process runs the renderer for this tab.
frameId
integer. The ID of the frame in the given tab.
callback
function. The function is passed the following arguments:
detailsOptional
object. Information about the requested frame, null if the specified frame ID and/or tab ID are invalid.

Additional objects

details

Information about the requested frame, null if the specified frame ID and/or tab ID are invalid.

errorOccurred
boolean. True if the last navigation in this frame was interrupted by an error, i.e. the onErrorOccurred event fired.
url
string. The URL currently associated with this frame, if the frame identified by the frameId existed at one point in the given tab. The fact that an URL is associated with a given frameId does not imply that the corresponding frame still exists.
parentFrameId
integer. ID of frame that wraps the frame. Set to -1 of no parent frame exists.

Browser compatibility

EdgeFirefoxChromeOpera
Basic support?47.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,