Skip to content

Inconsistency: runtime.getManifest() and missing keys #400

@bershanskiy

Description

@bershanskiy

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    inconsistencyInconsistent behavior across browsers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions