runtime.getManifest()
Erhalten Sie die komplette manifest.json-Datei, deserialisiert von JSON zu einem Objekt.
Syntax
js
browser.runtime.getManifest()
Parameter
Keine.
Rückgabewert
Ein object
, das das Manifest darstellt.
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | ||||||
---|---|---|---|---|---|---|---|
getManifest |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- See implementation notes.
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.
Beispiele
Holen Sie sich das Manifest und protokollieren Sie die "name"-Eigenschaft:
js
let manifest = browser.runtime.getManifest();
console.log(manifest.name);
Beispielerweiterungen
Hinweis:
Diese API basiert auf der chrome.runtime
-API von Chromium. Diese Dokumentation ist abgeleitet von runtime.json
im Chromium-Code.