谷歌浏览器Chrome 54 Beta新特性介绍
桌面用户同时打开多个窗口或选项卡是很常见的事。有些网站利用了此行为,例如网页编辑器可在其自己的选项卡中打开文档。在历史上,这些选项卡之间的通信一直很难。BroadcastChannel 是窗口、选项卡、iframe、Web Worker 及服务工作线程之间一种新型的一对多消息传递 API。它可让脚本建立命名通道以在同源浏览上下文之间发送消息。
除非另外注明,否则,下面介绍的更改均适用于最新 Chrome Beta 渠道版(Android、Chrome 操作系统、Linux、Mac 和 Windows)。
自定义原生
户界面通常需要大量 HTML。大多数语言可让开发者在语言原语的基础上创建自己的组件,以缓解这种繁冗。自定义元素可让开发者创建自定义的 HTML 标记,以及在 JavaScript 中定义新元素的 API 和行为。这样可以使用浏览器原生的方式构建可重复使用、可互操作的组件。
Chrome 54 支持最新的自定义元素 V1 规范,该规范获得了主要浏览器供应商的广泛认同。Chrome 也会继续支持 V0 API,直到有足够的开发者转移到 V1。
BroadcastChannel
桌面用户同时打开多个窗口或选项卡是很常见的事。有些网站利用了此行为,例如网页编辑器可在其自己的选项卡中打开文档。在历史上,这些选项卡之间的通信一直很难。BroadcastChannel 是窗口、选项卡、iframe、Web Worker 及服务工作线程之间一种新型的一对多消息传递 API。它可让脚本建立命名通道以在同源浏览上下文之间发送消息。
Chrome(Android 版)的媒体平台改进
对于需要灵活利用整个屏幕的移动设备,媒体在浏览体验中的角色越来越吃重。现在,当屏幕方向改变后,除了用户手势,开发者还可以使用 Element.requestFullScreen() 触发全屏模式。这可以提供像媒体播放器旋转切换至全屏这样的体验。
除了对全屏模式的改进之外,Android 上的 Chrome 现在可对后台运行的 HTMLVideoElement 保持提供媒体通知,可让用户在视频不可见时继续播放视频。开发者可以使用 Page Visibility API 检测后台视频播放。
此版本中的其他特性
- 在卸载处理程序中发起的导航将被阻止,任何之前的导航将会继续。
- CanvasRenderingContext2D 的 imageSmoothingQuality 属性可让开发者在缩放时调整分辨率来平衡性能与图像质量。
- 网站可以使用 Node.getRootNode(options) 获取指定节点的根。
- 利用 PushSubscription.options,网站可以跟踪 applicationServerKeys,而无需离线存储它们。
- Resource Timing API 现在支持 transfer、encoded 和 decoded 大小属性,可让开发者测量缓存命中率和字节使用量。
- user-select 属性可让开发者指定用户可以选择哪些元素以及如何选择。
- Foreign Fetch 和 WebUSB 可供试验用作起源试验。
弃用和互操作性的改善
- 为了匹配其他浏览器中的行为,嵌入的 YouTube Flash 播放器将被 Chrome 覆盖,以使用 HTML5 嵌入的样式,改进 Chrome Desktop 上的性能和安全。
- CacheQueryOptions 现在符合所有 CacheStorage 方法中的规范。
- initTouchEvent 已移除,代之以 新的 TouchEvent() 构造函数。
- SVGZoomEvent 已移除,因为它不再属于 SVG 2.0 规范。
- SVGSVGElement.currentView、SVGSVGElement.useCurrentView、SVGViewSpec 接口和 SVGSVGElement.viewport 已移除,因为它们不再属于 SVG 2.0 规范。
- SVGTests.requiredFeatures 属性已弃用,因为它不再在 SVG 2.0 规范中提供有用的功能。
- SVGElement 现在支持 dataset 属性。
- KeyEvent.keyIdentifier 字段已移除,代之以 KeyboardEvent.key 字段。
- window.external.IsSearchProviderInstalled() 和 AddSearchProvider() 现已弃用,因为大多数其他浏览器不再支持它们。






















发表回复