欢迎 What's new in Chrome extensions Get help with Chrome extensions API reference Samples
欢迎 What's new in Chrome extensions Get help with Chrome extensions API reference Samples

What's new in Chrome extensions

Published on Updated on

Check this page often to learn about changes to the Chrome extensions platform, its documentation, and related policy or other changes. You'll find other notices posted on the Extensions Google Group. The Extensions News tag lists articles about many of the topics listed here. (It even has an RSS feed.)

Chrome 113: New reasons for offscreen documents

Posted on

We have added two new reason types to the Offscreen Documents API. Use LOCAL_STORAGE to access the web platform's localStorage API. Use WORKER when creating web workers.

Google Analytics 4 now in the Developer Dashboard

Posted on

The Chrome Web Store Developer Dashboard now supports Google Analytics 4 (GA4). We've simplified setting up Google Analytics and made access management for group publishers more straightforward. If you previously used Google Universal Analytics to track your store listing activity, you will need to take action by July 1, 2023 to ensure that you continue receiving data about your store listing. For more information, see the post on the Chromium Extensions Google Group.

The File Handling API comes to ChromeOS

Posted on

The File Handler API is available for experimentation on ChromeOS in Canary for versions 112 and 113. It lets extensions on ChromeOS open files with specified MIME types and file extensions. To implement file handling add a set of rules to the manifest.json. This feature works the same as for Progressive web apps. For more information, see the article elsewhere on this site.

To enable file handling:

  • Starting in 112, launch Chrome using the --enable-features=ExtensionWebFileHandlers flag, starting in 112
  • Starting in 113, paste chrome://flags/#extension-web-file-handlers into the Chrome omnibox and select 'Enabled' from the dropdown menu.

We hope to launch this feature in Chrome 115, in late June. Watch this space for updates.

New Samples: dynamic declarations and programmatic injection

Posted on

We've built a new sample for the chrome.scripting API. It demonstrates dynamic declarations, where a content script is registered at runtime, and programmatic injection, where a script is executed in a tab that is already open.

New Samples: Declarative Net Request use cases

Posted on

Three new samples are available demonstrating the Declarative Net Request API. Each demonstrates implementation of a single use case. The first shows how to block cookies. The remaining two demonstrate blocking and redirecting URLs.

Chrome 112: Increased storage.session quota

Posted on

From Chrome 112, the quota for the storage.session property has been increased to approximately 10 MB. This was agreed to in the Web Extensions Community Group: https://github.com/w3c/webextensions/issues/350

Chrome 109: Offscreen documents

Posted on

Offscreen documents are now available in Manifest V3 extensions. These help with the transition from background pages to extension service workers by providing support for DOM-related features and APIs. For more information, read the blog post.

Chrome 109: Is an extension enabled

Posted on

The chrome.action.isEnabled() method programmatically checks whether an extension has been enabled for a specific tab. This saves you from maintaining the enabled state of your tabs. This new method takes a tab ID and a reference to a callback and returns a boolean. It has one limitation: tabs created using chrome.declarativeContent always return false.

(The chrome.action namespace recently got new methods for controlling the appearance of extension badges. For more information, see Setting badge colors.)

Chrome 110: Change in service worker idle timeout

Posted on

Previously, an extension service worker would frequently shut down at the five minute mark. We've changed this behavior to more closely resemble service worker lifetime's on the web. An extension service worker will be shut down after either thirty seconds of inactivity or if a single activity takes longer than 5 minutes to process. For more information, see Longer extension service worker lifetimes.

Post: Pausing Manifest V2 phase-out

Posted on

The Manifest V2 deprecation timelines are under review and the experiments scheduled for early 2023 are being postponed. For more information, read the update in the chromium-extensions Google Group.

Chrome 108: Setting badge colors

Posted on

The chrome.action namespace has two new methods to give you more control over the appearance extension badges. The setBadgeTextColor() and getBadgeTextColor() methods allow an extension to change and query its toolbar icon's badge text color. When used with setBadgeBackgroundColor and getBadgeBackgroundColor these new methods let you enforce design and brand consistency.

Blog post: More details on the transition to Manifest V3

Posted on

We have clarified the Manifest V2 deprecation timeline. The Manifest V2 support timeline has also been updated to reflect this information.

Docs update: Known issues when migrating to Manifest V3

Posted on

We've put together a list of major features currently in development and open bugs. Our goal with this page is to help developers better understand the current state of the platform and what features they can target as they prepare for the future.

Chrome Web Store: "large promo tile" image upload removed

Posted on

Chrome Web Store has removed the "large promo tile" upload UI from the item Store Listing tab in the developer dashboard. This change does not affect the end user experience as these images were not used in the consumer UI. See this chromium-extensions post for additional details.

Chrome 106: Allow pages on file:// urls to access web accessible resources

Posted on

Opaque origins such as sandboxed iframes and dynamic import should also be able to access web accessible resources, according to crbug.com/1219825#c11.

Chrome 106: Fixed bug allowing incorrect final arguments on some async API functions

Posted on

Previously, Manifest V3 calling async APIs could provide an invalid final argument and Chrome would not error. With this fix Chrome will now correctly error and report that there was no matching signature. Developers are encouraged to check their extensions on Canary for any errors in case they accidentally using incorrect signature for an API call that will be broken by this bug fix.

Blog post: Chrome Web Store analytics revamp

Posted on

Chrome Web Store has a revamped item analytics experience for the Chrome Web Store Developer Dashboard. The new dashboard is easier to understand at a glance and consolidates the most useful information up front. Read the blog post for more information.

Chrome 105: promises for the Identity API

Posted on

Functions on the Identity API now support promise based calls. This comes with a slight change to the surface for identity.getAuthToken(), where the asynchronous return set to a promise based call will have "token" and "grantedScopes" as parameters on a single object (as opposed to the callback version receiving them as separate arguments to the callback).

Chrome 104: New favicons API for Manifest V3

Posted on

Manifest V3 extensions can now access favicons using a new URL pattern: chrome-extension://<id>/_favicon/, where is the ID of your extension. This replaces the Manifest V2 platform's chrome://favicons API. See the Favicon API docs for more information.

Docs update: Developer trader/non-trader disclosure

Posted on

Added the trader/non-trader developer identification that informs developers to accurately self-declare their trader/non-trader status.

Chrome 103: Wasm in Manifest V3 requires wasm-unsafe-eval

Posted on

Chrome no longer grants extensions script-src: wasm-unsafe-eval by default. Extensions that use WebAssembly must now explicitly add this directive and value to extension_pages in their content_security_policy declarations.

Chrome 103: Changing MV3 shortcuts take effect immediately

Posted on

When changing a Manifest V3 extension's keyboard shortcut on chrome://extensions/shortcuts, updates are now applied immediately. Previously the extension would have to be reloaded before the change would take effect.

Chrome 102: Dynamic content scripts in main world

Posted on

Dynamically registered content scripts can now specify the world that assets will be injected into. See scripting.registerContentScripts() for details.

Chrome 102: New manifest field "optional_host_permissions"

Posted on

Manifest V3 extensions can now specify the optional_host_permissions key in manifest.json. This allows Manifest V3 extensions to declare optional match patterns for hosts just as Manifest V2 extensions could using the optional_permissions key.

Chrome 102: injectImmediately property in scripting.executeScript()

Posted on

chrome.scripting.executeScript() now accepts an optional injectImmediately property on it's injection argument. If present and set to true, the script will inject into the target as soon as possible, rather than waiting for document_idle. Note that this is not a guarantee the script will inject before the page is loaded since the page continues to load while the API call is being made.

Chrome 102: Omnibox API support in Manifest V3

Posted on

The Omnibox API can now be used in service worker-based extensions. Previously, some of this API's methods would throw on invocation due to internal dependencies on DOM capabilities.

Chrome 102: wasm-unsafe-eval allowed in Manifest V3 CSP

Posted on

Manifest V3 extensions can now include wasm-unsafe-eval in their content_security_policy declarations. This change allows Manifest V3 extensions to use WebAssembly.

Docs update: Chrome Web Store item discovery

Posted on

Discovery on Chrome Web Store gives an overview of how users find items on the Chrome Web Store and how our editors select items to feature.

Chrome 101: Improved declarativeNetRequest domain conditions

Posted on

declarativeNetRequest rule conditions have been updated to allow extensions to better target requests based on the request's "request" and "initiator" domains. The relevant condition properties are initiatorDomains, excludedInitiatorDomains, requestDomains, and excludedRequestDomains. See also this chromium-extensions thread.

Chrome 100: Resolved issue with scripting.executeScript() on newly created tabs

Fixed a longstanding issue where calling scripting.executeScript() on a newly created tab or window could fail.

Chrome 100: native messaging port keeps service worker alive

Posted on

Warning

This change did not fully address the underlying issue. We will share another update when we are confident that native messaging ports are behaving as intended.

Connecting to a native messaging host using chrome.runtime.connectNative() in an extension's service worker should keep the service worker alive as long as the port is open.

Chrome 100: omnibox.setDefaultSuggestion() supports promises and callbacks

Posted on

The omnibox.setDefaultSuggestion() method now returns a promise or accepts a callback to allow developers to determine when the suggestion has been properly set.

Chrome 100: i18n.getMessage() support in extension service workers

Posted on

The chrome.i18n.getMessage() API is now supported in extension service worker contexts.

Chrome 99: match_origin_as_fallback in Canary

Posted on

Content scripts can now specify the match_origin_as_fallback key to inject into frames that are related to a matching frame, including frames with about:, data:, blob:, and filesystem: URLs. See the content scripts documentation for details.

Chrome 99: extension service worker support for file: schemes in Canary

Posted on

Service worker-based Manifest V2 and Manifest V3 extensions can now use the Fetch API to request file:-scheme URLs. Access to file:-scheme URLs still requires that the user enable 'Allow access to File URLs' for the extension in the chrome://extensions page.

Chrome 99: promise support for messaging APIs in Canary

Posted on

Promise support has been added to tabs.sendMessage, runtime.sendMessage, and runtime.sendNativeMessage for extensions built for Manifest V3.

Docs update: Chrome Web Store review documentation

Posted on

Added a new reference page that provides an overview of the Chrome Web Store review process and explains how developer program policy enforcement is handled.

Chrome 98: scripting.executeScript() and scripting.insertCSS() accept multiple files

Posted on

The Scripting API's executeScript() and insertCSS() methods now accept multiple files. Previously these methods required an array with a single file entry.

Docs update: review violation troubleshooting updates

Posted on

The Troubleshooting Chrome Web Store violations page has been updated to provide developers with more detailed guidance for common reasons for rejection.

Chrome 96: expanded promise support to 27 more APIs

Posted on

This release contains significantly more promise updates than any previous release. Updates include both general and ChromeOS-specific extensions APIs. Expand the following sections for details.

Extensions APIs

A number of APIs now support promises in Manifest V3.

Also, APIs that use the ChromeSetting prototype now also support promises. The following APIs are affected by this change.

ChromeOS APIs

Chrome 96: dynamic content scripts

Posted on

The chrome.scripting API now supports registering, updating, unregistering, and getting a list of content scripts at runtime. Previously, content scripts could only be statically declared in an extension's manifest.json or programmatically injected at runtime with chrome.scripting.executeScript().

Docs update: Manifest V2 support timeline

Posted on

The Manifest V2 to V3 transition timeline was announced in this blog post and a more detailed timeline page was published.

Chrome 96: declarativeNetRequestWithHostAccess permission

Posted on

The new declarativeNetRequestWithHostAccess permission allows extensions to use the chrome.declarativeNetRequest API on sites the extension has host permissions for. This also enables existing Manifest V2 extensions that use webRequest, webRequestBlocking, and site-specific host permission to migrate to the chrome.declarativeNetRequest API without requiring the user to approve new permissions.

Chrome 95: inject scripts directly into pages

Posted on

The chrome.scripting API's executeScript() method can now inject scripts directly into a page's main world. Previously, extensions could only inject directly into the extension's isolated world. For more information on isolated worlds, see the documentation on content scripts.

Chrome 95: promise support for Storage API

Posted on

Methods on the Manifest V3 version of the chrome.storage API now return promises.

Policy update: two step verification enforcement

Posted on

The policy update blog post published on June 29, 2021 has been updated to correct the two step verification deployment timeline.

Chrome 94: declarative net request static ruleset changes

Posted on

The chrome.declarativeNetRequest now supports specifying up to 50 static rulesets (MAX_NUMBER_OF_STATIC_RULESETS) and enabling up to 10 rulesets (MAX_NUMBER_OF_ENABLED_STATIC_RULESETS) at a time.

Chrome 93: cross origin isolation support

Posted on

Both Manifest V2 and Manifest V3 extensions can now opt into cross origin isolation. This feature limits which cross-origin resources can load an extension's pages and enables the use of low level web platform features like SharedArrayBuffer. Opt in will be required starting in Chrome 95.

Policy update: developer program policies updated

Posted on

The Chrome Web Store Developer Program Policies have been updated with clarifications to the deceptive installation tactics, spam, and repetitive content policies. This update also includes a new two step verification requirement to publish on the Chrome Web Store. Read the blog post for more information.

Blog post: extension actions in Manifest V3

Posted on

Chrome extensions had chrome.browserAction and chrome.pageActions APIs for years, but Manifest V3 replaced both with a generic chrome.actions API. This post explores the history of these APIs and what has changed in Manifest V3. Read the post.

Blog post: introducing chrome.scripting

Posted on

The chrome.scripting API is a new Manifest V3 API focused on, well, scripting. In this post we dig into the motivations for this change and take a closer look at it's new capabilities. Read the post.

Chrome 92: module service worker support

Posted on

Chrome now supports JavaScript modules in service workers. To specify a module a module in your manifest:

"background": {
"service_worker": "script.js",
"type": "module"
}

This loads the worker script as an ES module, which lets you use the import keyword in the worker's script to import other modules.

Chrome 91: chrome.action.getUserSettings()

Posted on

The new chrome.action.getUserSettings() method allows extensions to determine if the user has pinned the extension to the main toolbar.

Chrome 90: chrome.scripting.removeCSS()

Posted on

The new chrome.scripting.removeCSS() method allows extensions to remove CSS that was previously inserted via chrome.scripting.insertCSS(). It replaces chrome.tabs.removeCSS().

Chrome 90: returning promises from scripting.executeScript()

Posted on

chrome.scripting.executeScript() now supports returning promises. If the resulting value of the script execution is a promise, Chrome will wait for the promise to settle and return its resulting value.

Chrome 90: chrome.scripting.executeScript() results include frameId

Posted on

Results returned from chrome.scripting.executeScript() now include the frameId. The frameId property indicates the frame that the result is from, letting extensions easily associate results with the individual frames when injecting in multiple frames.

Chrome 89: new API for managing tab groups

Posted on

The new chrome.tabGroups API and new capabilities in chrome.tabs let extensions read and manipulate tab groups. Requires Manifest V3.

Chrome 89: customizable permissions for web accessible resources

Posted on

Web accessible resources definitions in Manifest V3 have changed to let extensions restrict resource access based on the requester's origin or extension ID.

Blog post: Extension Manifest Converter

Posted on

The Chrome Extensions team has open sourced "Extension Manifest Converter", a Python tool that automates some of the mechanical aspects of converting extensions to Manifest V3. See the announcement blog post and get it from GitHub.

Chrome 88: Manifest V3 general availability

Posted on

Manifest V3 is a major update to the extensions platform; see Overview of Manifest V3 for a summary of new and changed features. Extensions may continue to use Manifest V2 for now, but this will be phased out in the near future. We strongly recommend that you use Manifest V3 for any new extensions, and begin migrating existing extensions to Manifest V3 as soon as possible.

Updated on Improve article

We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.