博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Chrome 61 Beta:JavaScript 模块,桌面端的支付请求 API,Web Share API 和 WebUSB
阅读量:6935 次
发布时间:2019-06-27

本文共 1783 字,大约阅读时间需要 5 分钟。

原文来自 Chrome 官方博客:

译者:

除非另有说明,否则下述更改适用于 Android,Chrome OS,Linux,Mac 和 Windows 的最新 Chrome Beta 版本。

JavaScript 模块(Modules)

Modules 允许开发人员声明脚本的依赖关系,这在第三方构建工具中已经很受欢迎,第三方构建工具使用它们用来只打包需要的脚本。此版本通过新的 <script type=module> 元素添加对

的原生支持。

原生支持意味着浏览器可以并行获取精细的依赖关系,利用缓存来避免整个页面中的重复,并确保脚本按照正确的顺序执行,而无需构建步骤。

进一步阅读, 和 .

用于桌面环境的付款请求 API(Payment Request API)

现在可用于 Windows,Mac,Linux 和 ChromeOS,去年已经。开发人员现在可以跨平台提供安全、无缝的结帐体验。

进一步阅读,。

The PaymentRequest process throughout a transaction.

Web Share API

为了让用户轻松地在社交网络上分享内容,开发人员不得不为每个社交服务手动将分享按钮集成到他们的网站中。这通常导致用户无法方便的使用订制的分享服务,而那些包含第三方代码的页面无形中增加了代码大小和安全风险。

网站现在可以在 Chrome for Android 上使用新的 API 来触发本机

Android 共享对话框,允许用户轻松地与任何已安装的本机应用程序共享文本或链接。在将来的版本中,此 API 也可以分享到已安装的 Web 应用程序。

The navigator.share API allows the user to share content with a variety of native apps via the native Android share dialog.

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 the window.scrollTo() DOM scroll method, eliminating the need to implement this behavior with JavaScript

  • can 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 .

  • ...


欢迎关注我的公众号,关注前端文章:

justjavac微信公众号

转载地址:http://eswnl.baihongyu.com/

你可能感兴趣的文章
初始化和类装载
查看>>
智能指针_auto_ptr2_学习笔记
查看>>
虚拟化--012 多台虚拟机ping不通原因.
查看>>
什么是域名?什么网站名?什么是URL?
查看>>
追求吧!兄弟们!
查看>>
密码学研究-证书
查看>>
python 递归调用
查看>>
java --String类解决面试问题
查看>>
Android listview viewholder
查看>>
Oracle Database基础
查看>>
python编码最佳实践之总结
查看>>
TensorFlow的基本运算01-01
查看>>
SylixOS 基于STM32平台的GPIO模仿I2C总线的驱动开发流程
查看>>
波音公司计划利用 3D 打印技术制作模块化卫星
查看>>
将tgz文件解压到指定目录
查看>>
XSS攻击之窃取Cookie
查看>>
苹果支付和ios安全 - 你需要知道的
查看>>
String和int 转换
查看>>
Eclipse中阿里JAVA代码规范插件(P3C)的安装及使用
查看>>
Android零基础入门第77节:Activity任务栈和启动模式
查看>>