Google today launched Chrome 73 for Windows, Mac, Linux, Android, and iOS. The release includes support for hardware media keys, PWAs and dark mode on Mac, and the usual slew of developer features. You can update to the latest version now using Chrome's built-in updater or download it directly from google.com/chrome.

With over 1 billion users, Chrome is both a browser and a major platform that web developers must consider. In fact, with Chrome's regular additions and changes, developers often must stay on top of everything available -- as well as what has been deprecated or removed -- most notably, Chrome 73 removes drive-by downloads in sandboxed iframes.

New media features

If you have a keyboard or headset with media playback keys (play/pause, previous track, next track, and so on), Chrome now supports those. If you press the pause key, for example, the active media element playing in Chrome will be paused and receive a "paused" media event. If the play key is pressed, the previously paused media element will be resumed and receive a "play" media event. Best of all, this all works whether Chrome is in the foreground or the background. In Chrome OS, you can pause and resume audio across Chrome, Chrome Apps, and Android Apps.

[embed]https://storage.googleapis.com/webfundamentals-assets/videos/pwa-auto-pip.mp4[/embed]

Chrome 73 adds support for Auto Picture-in-Picture for installed Progressive Web Apps (PWAs) on the desktop. This can be handy for when, say, you're on a conference call and are switching between apps or tabs. The video element has received a new autopictureinpicture attribute to make this possible. It works like this:

    Also for installed PWAs, Chrome now supports autoplay with sound on desktop, just like it does on mobile. Google is presumably making this change despite its war on autoplay with sound because users expect different experiences from apps than websites.

    All of this brings us to the bigger PWA news.

    PWAs and dark mode

    Chrome 73 supports PWAs on macOS. These apps install and behave like native apps (they don't show the address bar or tabs). Google killed off Chrome apps last year and has been focusing on PWAs ever since. Adding Mac support means Chrome now supports PWAs on all desktop and mobile platforms: Windows, Mac, Linux, Chrome OS, Android, and iOS.

    But Google isn't done. It plans to add new web platform capabilities that give developers access to the file system, wake lock, policy installation for enterprises, and even an ambient badge on the address bar to let users know a PWA can be installed.

    article image

    Here's Google's pitch to developers:

    A Progressive Web App is fast, and reliably so; always loading and performing at the same speed, regardless of network connection. They provide rich, engaging experiences via modern web features that take full advantage of the device capabilities. Users can install your PWA from Chrome's context menu, or you can directly promote the installation experience using the beforeinstallprompt event. Once installed, a PWA integrates with the OS to behave like a native application: users find and launch them from the same place as other apps, they run in their own window, they appear in the task switcher, their icons can show notification badging, and so on.

    If you're a developer, you should check out the standard PWA criteria that Chrome will check. If your PWA passes, Chrome will fire the beforeinstallprompt event, which you can add to with prompt().

    Speaking of Macs, Chrome now also supports dark mode on Apple's desktop operating system. Dark mode for Windows is on the way, the team promises.

    Android and iOS

    Chrome 73 for Android is rolling out slowly on Google Play. It includes stability and performance improvements, plus two additions:

      Google unveiled Chrome Lite Pages earlier today.

      Chrome 73 for iOS is available on Apple's App Store with the following changelog:

        The last one will be particularly helpful for developers with iOS devices.

        Security fixes and improvements

        Chrome 73 also implements 60 security fixes. The following were found by external researchers:

        • 913964
        Google thus spent at least $13,500 in bug bounties for this release. That's significantly less than usual, but as you can see many of the security fixes don't yet have awards attached. As always, the security fixes alone should be enough incentive for you to upgrade.

        Developer features

        article image

        Chrome 73 includes constructable stylesheets, which means there's now a programmatic way to add stylesheets. Although it has been previously possible to dynamically create a stylesheet by attaching it directly to a style element's sheet property, this sometimes resulted in a flash of unstyled content and the bloat of duplicate CSS rules. Constructable stylesheets let you define and apply shared CSS styles to multiple shadow roots or to the document object. Referred to as adopting, updates to a shared style sheet are applied everywhere it's been adopted. Instead of a new API, stylesheets are constructed imperatively with the replace() and replaceSync() methods.

        Next, Chrome 73 adds String.prototype.matchAll(), a new regular expression matching method. It provides a more complete set of matches than String.prototype.match() does.

        Chrome 73 includes passive mousewheel listeners. In Chrome 56, Google changed touchstart and touchmove that are registered on root targets to be passive by default, letting the browser safely perform scrolling and zooming without being blocked on listeners. Chrome 73 ensures the wheel and mousewheel event listeners behave the same way.

        Chrome 73 updates the V8 JavaScript engine to version 7.3. It includes the --async-stack-traces and --harmony-await-optimization flags, faster Wasm startup, and new JavaScript language features. Check out the full changelog for more information.

        Other developer features in this release include:

        • Cross-Origin-Resource-Policy response header
        • Cross-Origin-Resource-Policy
        For a full rundown of what's new, check out the Chrome 73 milestone hotlist.

        Google releases a new version of its browser every six weeks or so. Chrome 74 will arrive by end of April.