Back in July, we launched a new blog series to keep you up-to-date on extension developments. Thanks to your valuable feedback and our ongoing collaboration with fellow browser vendors in the WebExtensions Community Group, we continue to enhance extension APIs and work towards greater consistency across browsers.
Welcome to the October edition! In this post, we’ll look at some of the changes the Chrome extension team has made in the past few months, as well as some new features that’ll come out later this year. Let’s get started!
If you’d like a TL;DR, feel free to jump to the Coming soon… section for new extension features you can start looking forward to 🙂.
New extension APIs and features
In this section, we share some significant API launches, briefly review other API improvements, and share upcoming releases. All launches are currently available in the latest Beta release. See the chromium release schedule for details.
Highlights
Resolved known issues
The extension team has been actively working to resolve Manifest V3 stability issues. Chrome 116 launched many improvements that helped us make significant progress toward closing the feature gap between Manifest V2 and V3. In Chrome 120, we will have finished addressing all our prioritized platform gaps and closed all critical bugs that are documented on the known issues page. All features are currently available in Chrome 120 Canary, except fileHandler support for ChromeOS Lacros, and the userScripts API which will land later this month. Check out the updated known issues page for more details.
Improved Service Worker stability
Service worker-related stability issues have been resolved. In Chrome 116, we added strong keep-alives to extension APIs that display a user prompt and improved support for WebSockets (see the Using WebSockets in extensions tutorial). From Chrome 118 onward, a service worker will stay alive during an active Debugger API session.
Check out our updated Service Worker guidance for more details. If your users still encounter service worker-related stability issues in Chrome versions after 119, please let us know.
Increased security
Previously, navigating to some chrome://
URLs using tabs.update()
, tabs.create
, and windows.create()
emitted an error or would crash Chrome. Also, tabs.update()
couldn’t open a Javascript URL. In Chrome 117, we expanded the number of supported chrome://
URLs, and the Javascript URL blocking now also applies to all extension API methods.
In Chrome 117, users will receive proactive notifications on the Chrome Extensions page if an extension they’ve installed is no longer available on the Chrome Web Store. This can happen if the developer unpublishes the extension, it’s taken down for policy violations, or it’s identified as malware. For a deep dive, see Bringing Safety Check to the chrome://extensions page.
In Chrome 118, extensions will not be allowed to navigate to file://
URLs using the chrome.tabs
and chrome.windows
APIs unless the “Allow access to file URLs” option is enabled on the extension’s details page. See the WECG discussion.
More API launches
- Runtime API: Starting in Chrome 116, you can use
runtime.getContexts()
to retrieve information about active contexts. For example, you can check if there’s an active offscreen document. - Side Panel API In Chrome 116 you can use
sidepanel.open()
to open the extension side panel programmatically in response to a user gesture, such as a context menu click. - TabCapture API Added the ability to call
getMediaStreamId()
from the extension service worker and obtain aMediaStream
object from a stream ID in an offscreen document in Chrome 116. See Audio recording and screen capture for examples. - DeclarativeNetRequest API: The default value for the
isUrlFilterCaseSensitive
property was changed tofalse
in Chrome 118.
Coming soon…
We plan to address all remaining items on the known issues page with the release of Chrome 120. Additionally, we plan to add the following features:
- The UserScripts API will allow user script managers to coordinate how and when to inject a collection of user scripts into web pages. See the WECG proposal for details.
- The ReadingList API will allow developers to create, read, update, and delete metadata located in the Reading List panel of the side panel. Watch What’s new in Chrome extensions for the announcement.
- Following feedback in the Web Extensions Community Group, we are significantly increasing the limit on enabled static rulesets from 10 to 50. Additionally, we are increasing the total number of allowed static rulesets from 50 to 100. This is currently available in Canary.
- The File Handling API: will be available for ChromeOS extensions starting in ChromeOS 120, which lets extensions open files with specified MIME types and file extensions in a similar manner to web platform file handling.
- Extensions will be able to use the web Push API via
self.registration.pushManager.subscribe()
without showing a user-visible notification by settinguserVisibleOnly
tofalse
. This will make push notifications a more seamless alternative to WebSockets in service workers (MV3) for asynchronous client-server communication. See Chromium bug and WECG discussion for details.
Stay tuned to the What’s new in extensions page for announcements as soon as these features are available in Chrome Beta.
Documentation upgrades
We’ve also been improving and adding to our documentation. Please continue to ask questions on the chromium-group and report documentation issues.
Highlights
- We’ve revamped the Samples landing page. You can now filter by API, permission, and type, making it easier to locate specific samples. This enhancement was a collaborative effort with our Summer of Code intern, Xuezhou Dai. Read about his experience in this blog post.
- Using your Google Analytics account with the Chrome Web Store describes how to view Google Analytics 4 for your Chrome Web Store listing, complementing the data provided by the Developer Dashboard. This guide provides steps to opt into Google Analytics, monitor ad performance, track conversions, and grant other accounts access to Google Analytics data.
- We published a new guide on how cookies and web storage APIs work in Chrome extensions. It includes all you need to know about Privacy Sandbox as an extension developer.
- We launched new articles on how to integrate testing in your extension projects: Unit testing Chrome extensions and End-to-end testing for extensions covers general guidance and best practices across a number of popular frameworks. For a practical tutorial, see Testing Chrome Extensions with Puppeteer.
More updates
- We’ve rewritten the Declarative Net Request API guidance in a way that paints a clearer picture of how to implement declarative rulesets.
- We added more guidance for migrating remotely hosted code to Manifest V3. Plus, to minimize the risk of encountering issues during the release, we offer strategies for Publishing your Manifest V3 extension in stages.
- Learn how to connect to a WebSocket in your extension’s service worker.
- We expanded our Get Help guide to include more detailed instructions on how to file a bug, keep track of existing issues, request new features, and more.
Coming soon…
- User Scripts API reference and tutorial.
- Firebase tutorial and samples.
- ReadingList API reference.
Redesigning the Chrome Web store 🌈
Earlier this month, we announced an early preview of the revamped Chrome Web Store, as we hinted at Google I/O. Check it out for yourself! https://chromewebstore.google.com/. A few noteworthy changes are:
- Increased the list of categories from a list of eleven to a new list of seventeen in three category groups.
- Improved autocomplete in the search.
- Screenshots are now being displayed at significantly higher quality. If you haven’t already, you can upload 1280×800 screenshots.
- Replies to questions on the Support tab now show newlines.
- When replying to user reviews and support questions, your response will now include a “Developer” badge beside your name.
- You can provide users with a direct link to the reviews page by adding «/reviews» at the end of your store item URL For example:
https://chromewebstore.google.com/detail/_EXTENSION_ID_/reviews
.
Thanks for everyone’s input so far on the chromium-google group. Feel free to join in the discussion or send your feedback directly to the CWS team using the Give feedback menu item:
Additionally, you can submit a self-nomination form to be featured in the Editors’ Picks collection. Stay tuned for improvements coming soon to the developer dashboard as well!
💡 Did you know?
- There’s a new video on Debugging Chrome extensions. It covers many topics you may already be familiar with, but it also shares a few neat tricks for using DevTools in extensions.
- You are now required to provide a privacy policy for each extension. Previously, you could only add one privacy policy per developer account, but it was awkward if you had a few extensions under one developer account. This new interface is available in the Privacy Tab of your item in the developer dashboard. This means that account-level privacy policies are no longer supported.
Reaching out 🙌
We’ve continued reaching out to the extension developer community through 1:1’s, launching new programs, and attending summits. Here are a few highlights:
- The extensions Google Developer Experts program was launched in August. We have over a dozen new Chrome extension-focused GDEs from around the world providing us with great feedback. It’s a very exciting time for the program!
- We attended TPAC (W3C’s annual conference) as part of the Web Extensions Community Group and met with representatives from Firefox and Safari along with several members of the community. We made significant progress on several topics, including moving towards more consistent extension APIs, working on a specification, and building on top of Web Platform Tests to create a new testing suite. Read the full minutes in the WECG repository.
- Last week, the extension team participated in the Ad-Filtering Dev Summit in Amsterdam. They met several of you at a coffee chat they hosted before the summit week and the open office hours on Friday.
Even if you were unable to attend any of these events, you can continue getting involved by asking questions on the chromium-extensions Google group, following browser partner discussions on the WECG, and reporting any documentation issues.
Thanks again for being a part of the extension developer community!
This post is also available in: English