Chrome extension manifest 2 and 1, compatibility

Erik Rothoff picture Erik Rothoff · Oct 2, 2012 · Viewed 14.3k times · Source

I have an extension that I recently upgraded to manifest version 2. To do this I removed the background_page property in the manifest file and replaced it with background: {page: "background.html"}. This works and everything is fine. Turns out, however, that there are browsers and people out there with old versions of Chrome, or versions of Rockmelt and other Chromium-based browsers that don't support the background-property, or the manifest_version: 2 yet.

A simple solution would be to just add the background_page: "background.html"-property to the manifest file, in addition to the background-property. This gives the warning in chrome://extension developer mode:

There were warnings when trying to install this extension:
     'background_page' requires manifest version of 1 or lower.

My question is: can having both have any negative impact? For example, what will happen when background_page is deprecated? Will my users see any warnings? Any ideas?

Answer

Wu Zhou picture Wu Zhou · Dec 29, 2012

You should replace "background_page" with "background".

Like:

"background": "background.html"

Rather than:

"background": {"page": "background.html"}