Gaming execs: Join 180 select leaders from King, Glu, Rovio, Unity, Facebook, and more to plan your path to global domination in 2015. GamesBeat Summit is invite-only -- apply here. Ticket prices increase on April 3rd!
A week after releasing the stable version of Chrome 41, Google announced Chrome 42 beta for Windows, Mac, Linux, and Android. While the release actually arrived on Monday, the company only offered details about the new features today, including push notifications, ES6 Classes, and Add to Home Screen promotion on Android.
Chrome is arguably more than a browser: With hundreds of millions of users, it’s a major platform that Web developers have to consider. In fact, with regular additions and changes, they have to keep up to ensure they are taking advantage of everything available.
Chrome is arguably more than a browser: With hundreds of millions of users, it’s a major platform that Web developers have to consider. In fact, with regular additions and changes, they have to keep up to ensure they are taking advantage of everything available.
First and foremost, Chrome 42 beta offers two new APIs that together allow sites to push native notifications to their users even after the given page is closed. While that may sound intrusive, Google says the user has to grant explicit permission for this to be possible.
Once that has happened, a developer can use the new Push API via Google Cloud Messaging to remotely wake up their service worker, which in turn can run JavaScript for a short period. In this release, Google requires showing a user-visible notification that includes a “Site Settings” button hwere users can easily disable notifications.
Next up, Google has added new JavaScript ES6 features. Most noteworthy are ES6 classes (strict mode is required), which solve help developers who have trouble adapting to JavaScript’s prototype-based inheritance. While many libraries have introduced their own patterns for emulating classes, this is the first attempt to provide a single, uniform, and standardized syntax to describe them.
While Chrome 32 introduced the ability for Android users to add home screen shortcuts to their favorite websites via a menu item, Chrome 42 beta takes the functionality a step further by offering a banner. Users who frequently visit a high-quality web app will asked if they want to add the site to their home screen in one tap:
Once that has happened, a developer can use the new Push API via Google Cloud Messaging to remotely wake up their service worker, which in turn can run JavaScript for a short period. In this release, Google requires showing a user-visible notification that includes a “Site Settings” button hwere users can easily disable notifications.
Next up, Google has added new JavaScript ES6 features. Most noteworthy are ES6 classes (strict mode is required), which solve help developers who have trouble adapting to JavaScript’s prototype-based inheritance. While many libraries have introduced their own patterns for emulating classes, this is the first attempt to provide a single, uniform, and standardized syntax to describe them.
While Chrome 32 introduced the ability for Android users to add home screen shortcuts to their favorite websites via a menu item, Chrome 42 beta takes the functionality a step further by offering a banner. Users who frequently visit a high-quality web app will asked if they want to add the site to their home screen in one tap:
If you’re a developer who wants to take advantage of this new feature, you have to meet the eligibility criteria (provide a Web App Manifest, serve all content using HTTPS, and at least partially work offline using a service worker), which will evolve over time based on feedback from users and developers. Google wants to ensure users have a good experience when launching sites from the Android home screen even when offline.
Other developer additions include:
- DevTools now allows developers to visually edit cubic beziers directly from the styles pane, making it easier to understand and modify animations.
- The Fetch API is now available in the window context, shared workers, and dedicated workers, providing a new promise-based standard for AJAX requests.
- The startRendering method of an OfflineAudioContext instance now returns a promise that resolves when the audio has finished rendering, making it easier to design web apps that work with the Web Audio API.
- AudioBufferSourceNode.buffer can no longer be set more than once, protecting developers from the lack of control over when the new source starts.
- Chrome OS now supports screen.orientation and fires the DeviceOrientationEvent when the device’s orientation changes significantly, allowing orientation-aware websites to operate correctly on Chrome OS devices.
- This release includes an updated and unprefixed implementation of Encrypted Media Extensions, which allows media sites to discover and interact with digital rights management systems.
- A new content setting allows users to automatically pause non-primary plugin content to save power. Developers can turn it on to test how it interacts with their content.
Google releases new versions of Chrome every six weeks or so. We thus expect Chrome 42 stable, which also happens to be the the last version to support Android 4.0 Ice Cream Sandwich, to arrive at the end of April.