Google has made another big move, and the new version of Chrome is released.
What browser are you using? Chrome 55 Beta has been released. Are you looking forward to seeing all the technical improvements and changes?
The main content is as follows:1. Improved Input ProcessingWith the popularization of mobile networks, websites are increasingly important to respond to touch input. In the past, this meant processing MouseEvent and TouchEvent separately, which may be difficult to maintain. Currently, Chrome supports unified input processing by dispatching PointerEvents events. By default, PointerEvents does not block scrolling, so the page response is faster. To use TouchEvent to achieve the same performance, passive Event Listeners can be used for pages.
Chrome now supports two completely new input response methods. The touch-action CSS attribute enables websites to respond to gestures, such as translation. For the mouse button, the new auxclick input event type allows the website to manage the click behavior of non-main buttons.
2. Async and awaitXtep JavaScript may be difficult to deduce. Promise can help avoid callback nesting. However, when a website has a large number of asynchronous dependencies, the Promise-based code may still be hard to read. Chrome now supports async and await JavaScript keywords, allowing developers to write JavaScript Based on Promise that can be structured and read in the form of Synchronous Code.
Extract the URL and use Promise to record the response:
- FunctionlogFetch (url ){
- Returnfetch (url)
- . Then (response => response. text ())
- . Then (text => {
- Console. log (text );
- }). Catch (err => {
- Console. error ('fetchfailed', err );
- });
- }
Use the same Code of async and await:
- AsyncfunctionlogFetch (url ){
- Try {
- Constresponse = awaitfetch (url );
- Console. log (awaitresponse. text ());
- }
- Catch (err ){
- Console. log ('fetchfailed', err );
- }
- }
3. CSS Automatic Word breakingSetting text formats to fill in available space may be a challenge for various devices and screen sizes. Chrome now supports CSS Automatic Word breaking, which is one of the most common layout features of Chrome for Android and Mac. CSS word breaking allows the browser to use a font to break words automatically when changing the line, thus improving the visual consistency of text blocks. In future versions, word breaking support will be extended to other platforms.
4. Other features in this version
- The once event listener option supports calling a callback only once before the event listener is removed.
- Now, websites can mark network storage as permanent storage to prevent Chrome from automatically clearing the storage of the website.
- Currently, in Android systems, cross-source iframe requires a user gesture to start Audio playback using the Web audio API to ensure that it matches the <Audio> and <video> elements.
- The TLS protocol stack now implements GREASE, which is a mechanism to help prevent problems due to errors on the TLS server.
- Developers can create MediaStreamTrackEvent using the new JavaScript constructor in another way.
- RSA-PSS signature algorithms have been added to TLS to prepare TLS 1.3.
- To shorten the loading time and avoid Navigation failure, the cross-source and parser blocking script injected with document. write () will not be loaded through a 2G connection.
- Now we also provide the AudioNode constructor in the new AudioNode (context, options) format, making it easier to manage audio using scripts.
- When the media player is too narrow to display each button, an overflow menu is displayed to provide users with a hidden function.
- Now, when the file associated with playing is available for download, a Download button is displayed in the Chrome media control.
- The Web Share API can now be used as a source trial.
5. Improvement of obsolete items and interoperability
- BaseAudioContext replaces the AudioContext in the Web Audio API to comply with the specifications.
- The webkit prefix is no longer required for the CSS Clipping Path attribute.
- In addition to the existing webkitMediaStream, MediaStream constructor is also provided, and no prefix is required.
- Non-script MIME type will not trigger script execution.
- <Textarea maxlength = ""> and <textarea minlength = ""> have been updated to count each line break as one character rather than two characters.
- The webkit prefix has been removed from the imageSmoothingEnabled attribute of CanvasRenderingContext2D.
From: http:// OS .51cto.com/art/201610/520047.html
Address: http://www.linuxprobe.com/chrome-55-beta.htmledit: Liu Feng, reviewer: FENG Qi