How to Access objects from manifest.json in a Google Chrome extension




In Chrome each and every extension, theme and installable web app has a JSON-formatted manifest file, which is named as manifest.json, that provides important information.


But in chrome, no default feature is available to access the manifest.json information. The following code shows the method you can use to get the information that is available in manifest.json in runtime.
Simply call chrome.runtime.getManifest(), which returns an object representing the manifest. This short snippet code will load the manifest object and will return the details about the app from the manifest.



Also to get the version of the chrome extension or application, use :




This version is the one you set in the manifest file.