runtime.getURL()

Given a relative path from the manifest.json to a resource packaged with the add-on, return a fully-qualified URL.
 
Note: this function does not check that the resource actually exists at that URL.
 

Syntax

browser.runtime.getURL(
  path // string
)

Parameters

path
string. A relative path from the manifest.json to a resource packaged with the add-on.

Return value

string. The fully-qualified URL to the resource.

Browser compatibility

EdgeFirefoxChromeOpera
Basic support?45.0Yes33
Firefox
Basic support48.0

Examples

Example add-ons

Acknowledgements

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

Document Tags and Contributors

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