runtime.getPackageDirectoryEntry()
Returns a DirectoryEntry
object representing the package directory.
This is an asynchronous function that returns a Promise
.
Syntax
var gettingEntry = browser.runtime.getPackageDirectoryEntry()
Parameters
None.
Return value
A Promise
that will be fulfilled with a DirectoryEntry
object representing the package directory.
Browser compatibility
Report problems with this compatibility data on GitHubwebextensions-desktop | webextensions-mobile | |||||
---|---|---|---|---|---|---|
getPackageDirectoryEntry | ChromeFull support29 | EdgeFull support79 | FirefoxNo supportNo | OperaFull support16 | SafariNo supportNo | Firefox for AndroidNo supportNo |
Legend
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Examples
function gotDirectoryEntry(directoryEntry) {
console.log(directoryEntry);
}
var gettingEntry = browser.runtime.getPackageDirectoryEntry();
gettingEntry.then(gotDirectoryEntry);
Acknowledgements
This API is based on Chromium's chrome.runtime
API. This documentation is derived from runtime.json
in the Chromium code.
Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.