extension.getURL()

Converts a relative path within an extension install directory to a fully-qualified URL.

Syntax

browser.extension.getURL(
  path // string
)

Parameters

path
string. A path to a resource within an extension expressed relative to its install directory.

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.extension API. This documentation is derived from extension.json in the Chromium code.

Document Tags and Contributors

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