preface

What is Manifest V3? The manifest.json file contains the manifest_version field. The manifest_version field 3 indicates the manifest V3 version is used.

MV3 more take a fancy to security, has many functions, such as the implementation of remote JS code, after chrome 91 +, no longer support chrome. Tabs. ExecuteScript. In order to release to the official extension, you must change the code. So formal development, or to learn to use MV3.

This article is a machine translation of the official document, and it will add some knowledge points at the same time. It is still being updated. After the title, there is 🌹 to indicate that it is more commonly used/important.

What is the difference between Manifest V3 and Manifest V2?

Extensions using MV3 will provide enhanced security, privacy, and performance; They can also use the more modern open Web technologies used in MV3, such as Service Workers and promises.

  • Improved user visibility and control
  • Allow a user to change the host permissions granted to the extension
  • An extension menu that shows which items can or want to access the current page
  • A new user data access method
  • You do not want the extension to have persistent access to user data
  • You want users to grant permissions temporarily and only in contexts where they are needed.

Specific migration: developer.chrome.com/docs/extens…

The Manifest V3 overview

Major changes and features of Manifest V3. Posted Monday, November 9, 2020

Manifest V3 (MV3) is a major step forward in steering towards our vision for the extensions platform. MV3 focuses on the three pillars of that vision: privacy, security, and performance, while preserving and improving our foundation of capability and webbiness.

Manifest V3(MV3) is an important step that guides us toward our vision of an extended platform. MV3 focuses on the three pillars of this vision: privacy, security and performance, while maintaining and improving the foundations of our capabilities and network performance.

This article summarizes the features and major changes introduced by MV3. For help migrating Manifest V2 extensions to MV3, or to better understand the architectural impact of these changes, see also the MV3 migration guide.

This paper summarizes the characteristics and major changes of MV3. To help migrate Manifest V2 extensions to MV3, or to better understand the architectural impact of these changes, see the MV3 Migration Guide.

Manifest V3 is available beginning with Chrome 88, and the Chrome Web Store begins accepting MV3 extensions in January 2021.

Manifest V3 has been available since Chrome 88, and the Chrome Web Store will accept the MV3 extension from January 2021.

New features and changes will continue to be added to MV3, just as they have been in earlier manifest versions.

New features and changes will continue to be added to MV3, just as they were in earlier manifest versions.

Feature summary

There are a number of new features and functional changes for extensions using MV3:

There are some new features and functional changes using the MV3 extension:

  • Service workers Replace background pages. Replace background page
  • Network Request Modification Is now handled with the new declarativeNetRequest API. Air Pollution Index
  • Remotely Hosted code is no longer allowed; an extension can only execute JavaScript that is included within its package. No longer allowed; Extensions can only execute JavaScript contained in packages
  • I Promise support has been added to many methods, though callbacks are still supported as an alternative. (We will eventually support promises on all appropriate (methods.) support has been added to many methods, although callbacks are still supported as an alternative. (We will ultimately support commitment in all appropriate ways.)
  • A number of minor feature changes are also introduced in MV3. Also introduced in MV3

Each of these changes is summarized in the sections below.

The following sections outline these changes.

Major features

This section introduces the most important and impactful features of MV3.

This section describes the most important and influential features of MV3.

Service workers Service workers

Manifest V3 replaces background pages with service workers.

Manifest V3 replaces background pages with service workers.

Like their web page counterparts, extension service workers listen for and respond to events in order to enhance the end user’s experience. For web service workers this typically means managing cache, preloading resources, and enabling offline web pages. While extension service workers can still do all of this, the extension package already contains a bundle of resources that can be accessed offline. As such, extension service workers tend to focus on reacting to relevant browser events exposed by Chrome’s extensions APIs.

Like their web counterparts, outreach service people listen to and respond to events to improve the end user experience. For web services workers, this typically means managing caching, preloading resources, and enabling offline Web pages. While the extension service worker can still do all of this, the extension pack already contains resource bundles that can be accessed offline. Therefore, extension service workers tend to focus on reacting to relevant browser events exposed by the Chrome extension API.

Network Request Modification Network request modification

The way that extensions can modify network requests is changing in MV3. There’s a new declarativeNetRequest API which lets extensions modify and block network requests in a privacy-preserving and performant way. The essence of this API is:

Extensions can modify the way network requests are being changed in MV3. There is a new declarativeNetRequest API that allows extensions to modify and block network requests in a private and efficient manner. The essence of the API is:

  • Rather than intercepting a request and modifying it procedurally, the extension asks Chrome to evaluate and modify requests on its behalf. Instead of intercepting requests and making changes as per the program, this extension lets Chrome evaluate and modify requests on its own behalf
  • The extension declares a set of rules: patterns to match requests and actions to perform when matched. The browser then modifies network requests as defined by these rules. The extension declares a set of rules: patterns to match requests and the actions to be performed when matched. The browser then modifies the network requests defined by these rules

Using this declarative approach dramatically reduces the need for persistent host permissions.

Using this declarative approach can significantly reduce the need for persistent host permissions.

Some extensions may still require broad host permissions for certain use cases (such as redirecting requests). See Conditional permissions and declarativeNetRequest for further details.

For some use cases (such as redirection requests), some extensions may still require extensive host permissions. See Conditional Permissions and declarativeNetRequest for more information.

The blocking version of the webRequest API is restricted to force-installed extensions in MV3. This is because of issues with the blocking webRequest approach:

The blocking version of the webRequest API is limited to extensions that are forcibly installed in MV3. This is because of a problem with the blocking webRequest method:

  • Privacy Privacy: This requires excessive access to user data, because extensions need to read each network request made for the user. : This requires excessive access to user data because the extension needs to read every network request made for the user
  • Serializing & deserializing data across multiple process hops & the C++/JS boundary adds up. Serialize and deserialize data across multiple process hops & c + +/JS boundary addition
  • Compatibility Compatibility: Does not work well with event-based background execution as it requires the service worker to be running to handle every Request. : Does not handle event-based background execution well because it requires a service worker to run to handle each request

This means that developers can implement many common use cases, such as content blocking functionality, without requiring any host permissions.

This means that developers can implement many common use cases, such as content blocking, without requiring any host permissions.

Remotely Hosted Code

A key security improvement in MV3 is that extensions can’t load remote code like JavaScript or Wasm files. This lets us more reliably and efficiently review the safe behavior of extensions when they’re submitted to the Chrome Web Store. Specifically, all logic must be included in the extension’s package.

A key security improvement in MV3 is that extensions cannot load remote code, such as JavaScript or Wasm files. This allows us to more reliably and effectively check the secure behavior of extensions when they are submitted to the Chrome Web store. Specifically, all logic must be included in the extended package.

Instead of remote code, we recommend the use of remote configuration files. See the migration guide for more about how to work with this change.

We recommend using remote profiles instead of remote code. For more information on how to handle this change, see Migration Guide.

Promises 🌹

MV3 provides first-class support for promises: many popular apis now support promises, and we will eventually have all the appropriate methods support promises.

You can use promise chained, as well as async/await. If you provide callbacks for API methods, this will prevent promises from being returned. So you can delay this part of the migration until it’s ready, or you can start using Promises right away.

For example, the popup.js file for the official getStarted example changes as follows:

// V2
changeColor.onclick = function(element) {
  let color = element.target.value;
  chrome.tabs.query(
    {active: true.currentWindow: true},
    // The callback function
    function(tabs) {
      chrome.tabs.executeScript(
        tabs[0].id,
        {code: 'document.body.style.backgroundColor = "' + color + '"; '}); }); };Copy the code
// V3
changeColor.addEventListener("click".async (element) => {
  let color = element.target.value;
  let [tab] = await chrome.tabs.query({ active: true.currentWindow: true });
  // Wait for asynchronous completion

  / / chrome. Tabs. ExecuteScript into chrome. Scripting. ExecuteScript
  chrome.scripting.executeScript({
    target: { tabId: tab.id },
    function: setPageBackgroundColor(color),
  });
});

// This function executes as a script for the content of the current page
function setPageBackgroundColor(color) {
  document.body.style.backgroundColor = color;
}
Copy the code

Some scenarios, such as event listeners, still require a callback.

Other features

There are a number of other changes introduced in MV3:

Some other changes have been introduced in MV3:

  • Action API Consolidation: The Browser Action and Page Action APIs are unified into a single Action API. The browser action and page action apis are unified into a single action API
  • Web Accessible Resources These resources are now available only to specified sites and extensions. These resources can now only be used for specified sites and extensions
  • Content Security Policy (CSP): You now specify separate CSP for different execution contexts in a single object, And certain policies are disallowed. : You now specify separate CSPS for different execution contexts within a single object, and certain policies are disallowed
  • ExecuteScript () changes executeScript() Extensions can no longer execute arbitrary strings, only script files and functions. This method is also migrating from the Tabs API to the new Scripting API. : Extensions can no longer execute arbitrary strings, only script files and functions. This approach is also being migrated from the Tabs API to the new Scripting API

The following features will be added to MV3 soon:

The following features will soon be added to MV3:

  • Dynamic Content scripts: the new Scripting API lets extensions register and unregister content scripts at runtime. The new scripting API allows extensions to register and unregister content scripts at run time
  • New Favicon API this new JavaScript API replaces “chrome://favicons” and gives developers a way to retrieve websites’ favicons. This new JavaScript API replaces “Chrome :// Favicon” and provides a way for developers to retrieve site ICONS
  • In-memory storage: a new StorageArea on the Storage API that can be used to store values in memory across service worker restarts. Storage The new StorageArea on the API can be used to store values in memory when the service worker restarts

Look for announcements of these and other MV3 features as they become available.

Check the announcements for these and other MV3 features as they become available.

Last updated: Monday, November 9, 2020 • Improve article

Last updated: Monday, 9 November 2020 • Improved article


Migrate to Manifest V3

Developer.chrome.com/docs/extens…

Get you moving in the right direction. Posted Monday, November 9, 2020

This guide provides developers with the information they need to begin migrating an extension from Manifest V2 to Manifest V3 (MV3). Some extensions will require very little change to make them MV3 compliant, while others will need to be redesigned to some degree. Developers experienced with MV2, and who are creating new MV3 extensions, may also find this helpful. For a quick reference guide see the migration checklist.

This guide provides developers with the information they need to begin migrating extensions from Manifest V2 to Manifest V3(MV3). Some extensions require minimal modification to be compatible with MV3, while others require a redesign. Developers with MV2 experience and those who are creating new MV3 extensions may also find this helpful. For the quick Reference guide, see the Migration Checklist.

Manifest V3 offers a number of improvements reflecting the aims of our platform vision.

Manifest V3 provides a number of improvements that reflect the goals of our platform vision.

Feature summary

There are a number of new features and functional changes for extensions using MV3:

There are some new features and functional changes using the MV3 extension:

  • Service workers Replace background pages. Replace background page
  • Network Request Modification Is now handled with the new declarativeNetRequest API. Air Pollution Index
  • Remotely Hosted code is no longer allowed; an extension can only execute JavaScript that is included within its package. No longer allowed; Extensions can only execute JavaScript contained in packages
  • I Promise support has been added to many methods, though callbacks are still supported as an alternative. (We will eventually support promises on all appropriate (methods.) support has been added to many methods, although callbacks are still supported as an alternative. (We will ultimately support commitment in all appropriate ways.)
  • A number of minor feature changes are also introduced in MV3. Also introduced in MV3

For a fuller description of these changes, see the MV3 Overview.

For a more comprehensive description of these changes, see MV3 Overview.

Updating the manifest.json file

To use the features of MV3, you need to first update your manifest file. Naturally, you’ll change the manifest version to “3”, but there are a number of other things you need to change in the manifest file: host permissions, content security policy, action declarations, and web-accessible resources.

To use the features of MV3, you first need to update the manifest file. Of course, you will change the listing version to “3,” but you will need to change many other things in the listing file: host permissions, content security policies, action statements, and web-accessible resources.

Manifest Version Indicates the Manifest version

Changing the value of the manifest_version element is the key to upgrading your extension. This determines whether you’re using the MV2 or MV3 feature set:

Changing the value of the MANIFEST _ version element is the key to upgrading the extension. This determines whether you use the MV2 or MV3 feature set:

// Manifest v2

"manifest_version": 2
Copy the code
// Manifest v3

"manifest_version": 3
Copy the code

Host Permissions Host permission 🌹

In MV3, you’ll need to specify host permissions separately from other permissions:

In MV3, you need to specify host permissions and other permissions separately:

// Manifest v2
"permissions": [
  "tabs"."bookmarks"."http://www.blogger.com/",]."optional_permissions": [
  "* : / / * / *"."unlimitedStorage"
]
Copy the code
// Manifest v3
"permissions": [
  "tabs"."bookmarks"]."optional_permissions": [
  "unlimitedStorage"]."host_permissions": [
  "http://www.blogger.com/"."* : / / * / *"].Copy the code

Warning Warning

You do not have to declare content script match patterns in host_permissions in order to inject content scripts. However, they are treated as host permissions requests by the Chrome Web Store review process.

In order to inject the content script, you do not have to declare the content script matching pattern in Host_Permissions. However, they are treated as host permission requests by the ChromeWebStore review process.

Content Security Policy Content security policy 🌹

An extension’s content security policy (CSP) was specified in MV2 as a string; in MV3 it is an object with members representing alternative CSP contexts:

In MV2, the extended content security policy (CSP) is specified as a string; In MV3, it is an object whose members represent the optional CSP context:

// Manifest v2

"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'"
Copy the code
// Manifest v3

"content_security_policy": {
  "extension_pages": "..."."sandbox": "..."
}
Copy the code

extension_pages: This policy covers pages in your extension, including html files and service workers.

Extension_pages: This policy covers pages in the extension, including HTML files and service workers.

These page types are served from the chrome-extension:// protocol. For instance, a page in your extension is chrome-extension://<extension-id>/foo.html.

These page types come from the Chrome-extension :// protocol. For example, let’s say you have a page in your extension, chrome-extension://

/foo.html.

sandbox: This policy covers any sandboxed extension pages that your extension uses.

Sandbox: This policy covers all sandbox extension pages used by the extension.

In addition, MV3 disallows certain CSP modifications for extension_pages that were permitted in MV2. The script-src, object-src, and worker-src directives may only have the following values:

In addition, MV3 disallows certain CSP script-src, object-src, and worker-src directives for extension_pages allowed in MV2 that may only have the following values:

  • self
  • none
  • Any localhost source, (http://localhost.http://127.0.0.1, or any port on those domains)

CSP modifications for sandbox have no such new restrictions.

The CSP modification sandbox has no such new restrictions.

Browser_action & page_action unified 🌹

Specific view: browserAction/ description document specific view: pageAction/ description document

In MV2, there are two different apis for implementing actions: browser_action and page_Action. They were originally introduced in different roles, but over time it became redundant to distinguish them, so in MV3 we unified them into a single Action API:

// Manifest v2

// manifest.json
{
  "browser_action": {... },"page_action": { … }
}

// background.js
chrome.browserAction.onClicked.addListener(tab= >{... }); chrome.pageAction.onClicked.addListener(tab= >{... });Copy the code
// Manifest v3

// manifest.json
{
  "action": { … }
}


// background.js
chrome.action.onClicked.addListener(tab= >{... });Copy the code

To help with the migration process, the Action API is available in MV2 starting with Chrome 88.

Web_accessible_resources You can access the resource extension source 🌹

Web_accessible_resources is used to declare which extension resources and which extension sources are public.

Application scenario: After you use chrome.runtime.getURL to obtain a resource address, you can use the address to directly request resources.

This change restricts access to extended resources for a particular site/extension. Instead of setting up a list of files, we now set up a list of objects, each of which can be mapped to a set of resources, URLs, and extension_IDS:

// Manifest v2

"web_accessible_resources": [
  <files>
]
Copy the code
// Manifest v3

"web_accessible_resources": [{
  "resources": [<resources>],
  "matches": [<urls>],
  "extension_ids": [<keys>],
  // optional "use_dynamic_url": boolean
}]
Copy the code

The use_dynamic_URL key is not available yet. Support for this property will be provided in a later release.

Previously, the Web accessible resource list applied to all websites and extensions, which created opportunities for fingerprinting or unintentional resource access. The updated API allows extensions to have more control over which extension resources can be accessed by other sites or extensions. For usage information, see the Web Accessible Resources/Accessible Resources documentation.

Code Execution Code executes 🌹

MV3 imposes new restrictions that limit an extension’s ability to execute unreviewed JavaScript through a combination of platform changes and policy limitations.

MV3 adds new restrictions that, through a combination of platform changes and policy restrictions, limit the ability of extensions to execute uncensored JavaScript.

Many extensions are unaffected by this change. However, if your MV2 extension executes remotely hosted scripts, injects code strings into pages, or evals strings at runtime, you’ll need to update your code execution strategies when migrating to MV3.

Many extensions are unaffected by this change. However, if MV2 extends the execution of remotely managed scripts, the injection of code strings into pages, or evals at run time, then the code execution strategy needs to be updated when migrating to MV3.

With Manifest V3 the executeScript() method also moves to a different API.

Using the Manifest V3 executeScript() method also moves to another API.

  • MV2: chrome. Tabs. ExecuteScript ()
  • MV3: chrome. Scripting. ExecuteScript () chrome. Scripting. ExecuteScript ().

If you use executeScript() anywhere in your code, you’ll need to update that call to use the new API. The insertCSS() and removeCSS() methods similarly move from chrome.tabs to chrome.scripting.

If you use executeScript() anywhere in your code, you need to update the call to use the new API. The insertCSS() and removeCSS() methods are similarly migrated from chrome.tabs to chrome.scripting.

  chrome.tabs.query(
    { active: true.currentWindow: true },
    (tabs) = > {
      // console.log(tabs);
      const tab0 = tabs[0];
      const tabUrl = tab0.url;
      if (tabUrl.includes('chrome://extensions/')) return;
      Unchecked Runtime. LastError: Cannot access a Chrome :// Unchecked URL
      chrome.tabs.executeScript(tabs[0].id, {
        allFrames: false.code: contentFun.toString(), }); });Copy the code
// Background.js Background script
  chrome.tabs.query(
    { active: true.currentWindow: true },
    function (tabs) {
      // console.log(' get tabs: ', tabs);
      const target = { tabId: tabs[0].id };

      // Insert js file
      chrome.scripting.executeScript(
        {
          target,
          files: ['js/boss/background.js'],},(result) = > {
          console.log('bg.js has completed the programatically injected content script.The ${JSON.stringify(result)}`); });// Insert the CSS code
      const css = 'body { background-color = "red"; } ';
      chrome.scripting.insertCSS({
        target,
        css: css, }); });Copy the code

Remotely Hosted Code

Remotely hosted code refers to any code that is not included in an extension’s package as a loadable resource. For example, both of the following are considered remotely hosted code:

Remotely hosted code refers to any code not included in the extension pack as a loadable resource. For example, the following two types of code are considered remotely managed code:

  • JavaScript Files Pulled from a remote server JavaScript files obtained from a remote server
  • A code string passed into eval at Runtime a code string passed into eval at Runtime

In MV3, all of your extension’s logic must be bundled with the extension. You can no longer load and execute a remotely hosted file. A number of alternative approaches are available, depending on your use case and the reason for remote hosting. Two such approaches are:

In MV3, all the logic of the extension must be bound to the extension. The remote managed file could no longer be loaded and executed. Depending on your use case and the reason for remote hosting, there are many alternatives available. Two of them are:

Configuration- Driven Features and Logic — In this approach, your extension loads a remote configuration (for example a JSON file) at runtime and caches the configuration locally. The extension then uses this cached configuration to decide which features to enable.

* In this approach, the extension loads the remote configuration (such as a JSON file) at runtime and caches the configuration locally. The extension then uses the configuration of this cache to determine which features to enable.

Externalize logic with a remote service – Consider migrating application logic from the extension to a remote Web service that your extension can call. (Essentially a form of message passing.) This provides you the ability to keep code private and change the code on demand while avoiding the extra overhead of resubmitting to the Chrome Web Store.

* Externalizing logic with remote services — Consider migrating application logic from the extension to a remote Web service that your extension can call. (essentially a form of messaging) this enables you to keep your code private and change it as needed, while avoiding the extra overhead of resubmitting to the Chrome Web Store.

ExecuteScript Executes scripts 🌹

The code property of the executeScript Details object is no longer available in MV3.

Instead of executing a string code, you should move your code into a static JS file and execute it using the file property of the executeScript method:

// Manifest v2

// background.js
chrome.tabs.executeScript({
  code: 'alert("test!" ) '
});
Copy the code
// Manifest v3

// background.js
chrome.scripting.executeScript({
  file: 'content-script.js'
});

// content-script.js
alert("test!");
Copy the code

Alternatively, if the executed logic can be neatly wrapped in a function call, you can use the new function property:

// Manifest v2

// background.js
chrome.tabs.executeScript({
  code: 'alert("test!" ) '
});
Copy the code
// Manifest v3

// background.js
function showAlert() {
  alert("test!");
}

// let [tab] = await chrome.tabs.query({
// active: true,
// currentWindow: true,
// });
chrome.scripting.executeScript({
  // target: { tabId: tab.id },
  function: showAlert
});
Copy the code

Background & Service workers 🌹

Background page in MV2 is replaced by Service Workers in MV3: this is the fundamental change that affects most extensions.

Service Workers are event-based and, like event pages, they do not persist between invocations. Such changes often require a redesign, and there are several factors to consider: see Migrating from Background Pages to Service Workers for more details.

To help with the migration process, the MV2 extension can use Background Service Workers in Chrome 87.

// V2
  "background": {
    "scripts": ["background.js"],},Copy the code
// V3
  "background": {
    "service_worker": "background.js"
  },
Copy the code

Modifying network requests

There is a new declarativeNetRequest for network request modification, which provides an alternative for much of the webRequest AP’s functionality.

There is a new declarativeNetRequest for webrequest modifications that provides an alternative to most of the functionality of WebreQuestap.

When can you use blocking webRequest? When can I use a blocking webRequest? (#when-use-blocking-webrequest)

The blocking version of the webRequest API still exists in MV3 but its use is restricted to force-installed extensions only. See Chrome Enterprise policies: ExtensionSettings, ExtensionInstallForcelist.

A blocking version of the webRequest API still exists in MV3, but its use is limited to mandatory installation extensions. Please refer to the Chrome business strategy: ExtensionSettings ExtensionInstallForcelist.

All other extensions must now use declarativeNetRequest for network request modification. This moves the actual modification of the network request into the Chrome browser: the extension no longer can read the actual network request, and in most cases needs no host permissions.

All other extensions must now modify the network request using declarativeNetRequest. This moves the actual modification of the network request into Chrome: the extension can no longer read the actual network request, and in most cases does not require host permissions.

Request redirects and header modifications do require the user to grant host permissions.

Request redirection and header modification do require the user to grant host permissions.

How do you use declarativeNetRequest? How do I use declarativeNetRequest? (#how-use-declarativenetrequest)

Instead of reading the request and programmatically altering it, your extension specifies a number of rules, which map a set of conditions to corresponding actions. See the declarativeNetRequest reference documentation for a more detailed description of rules.

Instead of reading the request and programmatically modifying it, your extension specifies rules that map a set of conditions to the appropriate actions. See the declarativeNetRequest reference documentation for a more detailed description of the rules.

This feature allows content blockers and other request-modifying extensions to implement their use cases without requiring host permissions, and without needing to read the actual requests.

This feature allows content interceptors and other request modification extensions to implement their use cases without requiring host permissions or reading the actual request.

In order to aid with the migration process, the declarativeNetRequest API is available for use in MV2 extensions as of Chrome 84.

To help with the migration process, beginning with Chrome 84, the declarativeNetRequest API is available for MV2 extensions.

Conditional permissions and declarativeNetRequest(# Declarativenetrequest-conditional-perms)

Most use cases for declarativeNetRequest don’t require any host permissions at all. However, some do.

Most use cases of declarativeNetRequest do not require any host permissions at all.

Request redirects and header modifications do require the user to grant host permissions.

Request redirection and header modification do require the user to grant host permissions.

When extensions require host permissions for these use cases, we recommend a “tiered” permissions strategy. This means implementing the extension’s core functionality without using these permissions; putting the more advanced use cases behind an optional permission.

When extensions require host permissions for these use cases, we recommend using a “layered” permission policy. This means implementing the core functionality of the extension without using these permissions; Place more advanced use cases behind optional permissions.

This approach allows privacy-conscious users to withhold those permissions and still use much of the extension’s functionality. This means that developers can implement many common use cases, such as content-blocking functionality, without requiring any host permissions.

This approach allows privacy-minded users to deny these permissions, but still use most of the functionality of the extension. This means that developers can implement many common use cases, such as content blocking, without requiring any host permissions.

Sunset for Deprecated APIs Is not recommended

There are a number of APIs that have long been deprecated. Manifest V3 finally removes support for these deprecated APIs. These include:

There are many apis that have long since been deprecated. Manifest V3 eventually unsupported these deprecated apis. These include:

  • chrome.extension.sendRequest() chrome.extension.sendRequest ()
  • chrome.extension.onRequest 1. chrome.extension.onRequest
  • Chrome. The extension. OnRequestExternal extension. OnRequestExternal
  • chrome.extension.lastError
  • chrome.extension.getURL() chrome.extension.getURL ()
  • chrome.extension.getExtensionTabs() chrome.extension.getExtensionTabs ()
  • chrome.tabs.Tab.selected
  • chrome.tabs.sendRequest()
  • chrome.tabs.getSelected()
  • chrome.tabs.getAllInWindow()
  • chrome.tabs.onSelectionChanged
  • chrome.tabs.onActiveChanged
  • chrome.tabs.onHighlightChanged

As well as the undocumented:

And illegal immigrants:

  • chrome.extension.sendMessage() chrome.extension.sendMessage ()
  • chrome.extension.connect() Chrome.extension.connect ()
  • chrome.extension.onConnect 1. chrome.extension.onConnect
  • chrome.extension.onMessage 1. chrome.extension.onMessage

If your extensions use any of these deprecated APIs, you’ll need to make the appropriate changes when you migrate to MV3.

If your extension uses any of these unrecommended apis, appropriate changes will need to be made when migrating to MV3.

Last updated: Monday, November 9, 2020 • Improve article

Last updated: Monday, 9 November 2020 • Improved article