runtime.getManifest()
Получить весь файл manifest.json в виде объекта JavaScript, совместимого с JSON.
Синтаксис
js
browser.runtime.getManifest();
Параметры
Нет.
Возвращаемое значение
object
- объект JSON, представляющий манифест.
Совместимость с браузерами
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.
Примеры
Получить манифест и вывести его свойство "name":
js
var manifest = browser.runtime.getManifest();
console.log(manifest.name);
Example extensions
Примечание:
Этот API основан на Chromium API chrome.runtime
. Эта документация основана на runtime.json
из кода Chromium.