Background
runtime.getManifest() lets extensions to retrieve their own manifest.json contents (Chrome docs, MDN). At least in principle, since the retrieved data structure is actually a result of export of browser-internal data structure generated from manifest.json and other sources. This ticket aims to clarify the differences and reconciliate them.
Details
Availability
runtime.getManifest() availability in different contexts differs across browsers. In Chromium and Firefox, chrome.runtime.getManifest() exists in content script contexts, but in Safari it does not.
Using null or undefined for empty fields
Chromium and Safari use missing values (which do not appear in Object.keys() list and evaluate to undefined). Firefox uses null.
Manifest current_locale member
Chromium adds current_locale to manifest. Firefox does not. Safari 16.5 does not.
Manifest update_url
Chromium seemingly hides update_url.
Other differences?
Background
runtime.getManifest()lets extensions to retrieve their ownmanifest.jsoncontents (Chrome docs, MDN). At least in principle, since the retrieved data structure is actually a result of export of browser-internal data structure generated frommanifest.jsonand other sources. This ticket aims to clarify the differences and reconciliate them.Details
Availability
runtime.getManifest()availability in different contexts differs across browsers. In Chromium and Firefox,chrome.runtime.getManifest()exists in content script contexts, but in Safari it does not.Using
nullorundefinedfor empty fieldsChromium and Safari use missing values (which do not appear in
Object.keys()list and evaluate toundefined). Firefox usesnull.Manifest
current_localememberChromium adds
current_localeto manifest. Firefox does not. Safari 16.5 does not.Manifest
update_urlChromium seemingly hides
update_url.Other differences?