Reputation: 5123
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?
Upvotes: 17
Views: 14873
Reputation: 1129
You should replace "background_page" with "background".
Like:
"background": "background.html"
Rather than:
"background": {"page": "background.html"}
Upvotes: 44
Reputation: 37903
Even thought having undocumented, deprecated or experimental attributes in manifest.json
gives warnings, these warnings are only visible with "Developer mode" active. They don't affect end-user. In my option you are perfectly fine keeping background-page:
in your manifest.
You can also consider using minimum_chrome_version to block users with older browsers from downloading your latest update. It's a bit too late for that (since your manifest_vesion: 2
update is published) but you can do a small trick here. Downgrade to manifest_version: 1
, wait for everyone to download downgraded version and, yet again, push update with manifest_version: 2
this time adding minimum_chrome_version: 18
.
Upvotes: 5