Keep track of your migration progress
The checklists below are here to help you keep track of your migration work. They define tasks that must be completed with links to instructions. Migration work is broadly divided into five categories as described in the Migration summary.
Update the manifest
The manifest.json
file requires a slightly different format for Manifest V3 than for Manifest V2. This page describes changes that only affect the manifest.json
file. But many of the changes to scripts and pages also require changes to the manifest. Those changes are covered with the migration tasks that require them.
Migrate to a service worker
A service worker replaces the extension's background or event page to ensure that background code stays off the main thread. This enables extensions to run only when needed, saving resources.
Before beginning, read about the differences between background scripts and extension service workers.
- Update the "background" field in the manifest
- Move DOM and window calls to an offscreen document
- Convert localStorage to chrome.storage.local
- Register listeners synchronously
- Replace calls to
XMLHttpRequest()
with globalfetch()
. - Persist states
- Convert timers to alarms
- Keep the service worker alive (in exceptional cases)
Update API calls
Some features need to be replaced with Manifest V3 equivalents. Others need to be removed entirely.
- Replace
tabs.executeScript()
withscripting.executeScript()
. - Replace
tabs.insertCSS()
andtabs.removeCSS()
withscripting.insertCSS()
andscripting.removeCSS()
. - Replace Browser Actions and Page Actions with Actions
- Replace functions that expect a Manifest V2 background context.
- Replace callbacks with promises
- Replace unsupported APIs
Replace blocking web request listeners
Instead of programmatically reading network requests and altering them (as you did in Manifest V2), your extension specifies rules that describe actions to perform when a given set of conditions is met.
After completing the items above, you may want to review a few common use cases:
Improve extension security
Changes are required to improve the security of extensions. This includes removing remotely hosted code, which is no longer supported.
- Remove execution of arbitrary strings.
- Remove remotely hosted code
- Update content security policy.
- Remove unsupported content security policy values
Publish your Manifest V3 extension
After converting to Manifest Version 3, it's time to release your extension on the Chrome Web Store. Depending on the changes made, consider a step-wise roll out. This approach allows you to ensure your extension works as expected with a limited audience first, before releasing it to the entire user base.