Chrome 53 Beta: Shadow DOM, PaymentRequest, and Android autoplay
Monday, August 8, 2016
Shadow DOM V1
HTML, CSS, and JavaScript are powerful development languages, but they can be difficult to maintain in large code bases. Sites that embed third-party content also need to ensure that included styles do not affect other parts of their app. Chrome 53 supports Shadow DOM V1, which allows an element to encapsulate its style and child DOM away from the main document. This improves the maintainability of large or composed sites. Shadow DOM V1 has some significant changes from the V0 version, and is broadly agreed-upon by major browser vendors. Chrome will support both versions of the API until enough developers have moved to V1. The behavior of a shadow root is determined by which API call it was created with.
PaymentRequest API
Completing payments on the web can be a cumbersome process for users, leading to lower conversions on sites. While autofill has made it easier to enter information, efficient data entry on mobile is still a challenge. PaymentRequest allows for fast, seamless, and secure payments on the web using a credit card or Android Pay. It also lets users provide a billing address, shipping details, and payer information without typing. PaymentRequest is available on Chrome for Android, with support for more platforms coming soon.
Chrome for Android autoplays muted video
Video is a great way for sites to reach their users, but it can be jarring when it plays unexpectedly. This is especially true on mobile, where the user may be in an environment where audio is unwanted. Chrome on Android now allows muted videos to begin playing without user interaction. If the video was marked as muted and has the autoplay attribute, Chrome will start playing the video when it becomes visible to the user. Developers can also use script to play muted videos without user interaction. Muted videos that begin playing sound before a user action will automatically be paused.
Other features in this release
- Sites that send notifications to Android devices running Android 6.0 (Marshmallow) or later may now provide a badge to show in the status bar in place of the Chrome logo.
- Notification objects now provide getters for reading the notification action buttons and vibration pattern.
- Cross-origin plugin content smaller than 5x5 pixels no longer loads for users that have set "Detect and run important plugin content."
- The allow-presentation sandbox flag allows sites to control whether an iframe can present to external devices.
- pattern attribute values on input elements now use the unicode flag, improving syntax checking and other regular expression ergonomics.
- To prevent visual artifacts, all content will be re-rastered when its transform scale changes unless it has the will-change: transform CSS property.
- --webkit-filter is now an alias for the unprefixed filter property and will behave identically instead of having separate behaviors.
- --webkit-user-select now supports an all property which forces a selection to contain an entire element and all its descendants.
- The Web Bluetooth API is available experimentally on some platforms as an origin trial, allowing sites to communicate with nearby devices using the Bluetooth Generic Attribute Profile (GATT).
Deprecations and interoperability improvements
- Events generated by script will no longer trigger default actions, improving spec compliance and browser interop.
- TLS Diffie-Hellman ciphers have been removed, following their deprecation in M51 due to security concerns.
- Due to recent security issues, new certificates issued by Symantec Corporation or by CAs that chain to Symantec Corporation will no longer be trusted in Chrome unless accompanied with Certificate Transparency information.
Posted by Hayato Ito, Shadow DOM Chaffeur