原文来自 Chrome 官方博客:
译者:除非另有说明,否则下述更改适用于 Android,Chrome OS,Linux,Mac 和 Windows 的最新 Chrome Beta 版本。
JavaScript 模块(Modules)
Modules 允许开发人员声明脚本的依赖关系,这在第三方构建工具中已经很受欢迎,第三方构建工具使用它们用来只打包需要的脚本。此版本通过新的 <script type=module>
元素添加对
原生支持意味着浏览器可以并行获取精细的依赖关系,利用缓存来避免整个页面中的重复,并确保脚本按照正确的顺序执行,而无需构建步骤。
进一步阅读, 和 .
用于桌面环境的付款请求 API(Payment Request API)
现在可用于 Windows,Mac,Linux 和 ChromeOS,去年已经。开发人员现在可以跨平台提供安全、无缝的结帐体验。
进一步阅读,。
Web Share API
为了让用户轻松地在社交网络上分享内容,开发人员不得不为每个社交服务手动将分享按钮集成到他们的网站中。这通常导致用户无法方便的使用订制的分享服务,而那些包含第三方代码的页面无形中增加了代码大小和安全风险。
网站现在可以在 Chrome for Android 上使用新的 API 来触发本机
Android 共享对话框,允许用户轻松地与任何已安装的本机应用程序共享文本或链接。在将来的版本中,此 API 也可以分享到已安装的 Web 应用程序。
WebUSB
大多数硬件外设(如键盘、鼠标、打印机和游戏手柄)均受到高级 Web 平台 API 的支持。要使用专业的教育、科学或工业 USB 外设,用户必须找到并安装具有系统级权限的潜在不安全的驱动程序和软件。
Chrome 现在支持 WebUSB API,允许网络应用程序与用户授权的外设进行通信。这使得这些设备提供的所有功能都能保持网络的安全性。
此版本中的其他功能
The is now available on desktop as well as Android, to access the underlying connection information of a device.
Developers can now specify scrolling smoothness via a new optional parameter in existing or with the
scroll-behavior
.The CSSOM View brings native smooth scrolling to the platform through a the
scroll-behavior: smooth
CSS property or by using thewindow.scrollTo()
DOM scroll method, eliminating the need to implement this behavior with JavaScriptcan now hex colors of the format #RRGGBBAA and #RGBA.
Sites can now access the relative positions of the screen content with the , exposing complex functionality like pinch-and-zoom in a more direct way.
The is now available, exposing the amount of RAM on a user’s device to sites to optimize overall performance of a web application.
When navigating from an installed web app to a site outside the initial web app’s scope, the new site now automatically loads in a .
...
欢迎关注我的公众号,关注前端文章: