Cropped Chrome logo on the left, version number on the right.

New in Chrome 75

Published on Updated on

In Chrome 75, we've added support for:

I'm Pete LePage, let's dive in and see what's new for developers in Chrome 75!

Change log

This covers only some of the key highlights, check the links below for additional changes in Chrome 75.

Hint for low latency canvas contexts

Drawing on screen with the canvas element requires the page to synchronize graphics updates with the DOM. This synchronization can sometimes cause latency. For example, in a drawing app, latencies longer than 50 milliseconds can interfere with hand-eye coordination, making them difficult to use.

The desynchronized hint, when creating a canvas context, uses a different code path, that bypasses the usual DOM update mechanism. The hint tells the system to skip as much compositing as it can. In some cases, the canvas's underlying buffer is sent directly to the screen's display controller. This eliminates the latency that would be caused by using the renderer compositor queue.

Using the desynchronized hint is simple, just add desynchronized: true to the options object when creating the canvas.

const opts = { desynchronized: true };
const ctx = canvas.getContext('2d', opts);

Check out Joe's article Low-latency rendering with the desynchronized hint for more details, including how to do feature detection for it.

Share files with the Web Share API

The Web Share API allows you to plug into the share service provided by the OS, making it easy to share web pages and apps with other installed apps on the user's device.

In Chrome 75, the Web Share API now supports the sharing of files! I'm particularly excited about this because it makes it way easier for apps to share photos, videos and more. Squoosh is adding support for this to share a file once you've finished compressing it. The Web Share API currently supports the sharing of audio files, images, videos, and text documents.

It's best to use feature detection to see if the Web Share API is supported, and fallback to your traditional mechanism if it's not. And you can use navigator.canShare to check if file sharing is supported.


const webShareAvailable = {
links: 'share' in navigator,
files: 'canShare' in navigator,
};

If navigator.canShare returns true, sharing of those files is supported, so you can call navigator.share, and pass an object with the array of files you want to share. Chrome will open the system share sheet and give you a list of installed apps that you can share the files to.

if (webShareAvailable.files) {
const shareData = { files: filesArray };
if (navigator.canShare(shareData)) {
shareData.title = 'Squooshed files.';
navigator.share(shareData)
.then(...)
.catch(...);
} else {
// File sharing not supported
}
}

Try the demo and check out the article Share files with Web Share for complete details.

Numeric separators

Numeric literals now allow underscores (_, U+005F) as separators to make them more readable. For example, 1_000_000_000 will be interpreted by mathematical operations as equivalent to 1000000000.

Underscores can only appear between digits, and consecutive underscores are not allowed. So literals such as 3._14, _2.71 or 1.6__2 are illegal.

Google I/O 2019 is a wrap

If you didn't make it to I/O, or maybe you did, and didn't see all the talks, they're all up on the Chrome Developers YouTube channel, in the Web at Google I/O 2019 playlist.

Subscribe

Want to stay up to date with our videos, then subscribe to our Chrome Developers YouTube channel, and you'll get an email notification whenever we launch a new video.

I'm Pete LePage, and as soon as Chrome 76 is released, I'll be right here to tell you -- what's new in Chrome!

Photo Credits

Updated on Improve article

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