chrome88 android,Chrome 88 发布!

原标题:Chrome 88 发布!

注:个人时间精力有限,所以仅做转载,不做翻译。

7ca72b7743e658cfab23a790a417d33f.png

原文链接:https://developers.google.com/web/updates/2021/01/nic88

Chrome 88 is starting to roll out to stable now.

Here's what you need to know:

You can now upload extensions using manifest v3 to the Chrome Web Store.

The aspect-ratio CSS property makes it easy to set the aspect ratio on any element.

Chrome 88 will heavily throttle chained Java timers for hidden pages in particular conditions.

You can now use Play Billing in your Trusted Web Activity.

All the videos from Chrome Dev Summit are up.

And, there’s plenty more.

I’m Pete LePage, working, and shooting from home, let’s dive in and see what’s new for developers in Chrome 88!

Manifest v3

Chrome 88 now supports extensions built with manifest v3, and you can upload them to the Chrome Web Store. Manifest v3 is a new extension platform, that makes Chrome extensions more secure, performant, and privacy respecting, by default.

cc40fb2232925fb94326748c4853130b.png

For example, it disallows remotely hosted code, which helps Chrome Web Store reviewers better understand what risks an extension poses. And should allow you to update your extensions faster.

It introduces service workers as a replacement for background pages. Since service workers are only resident in memory when needed, extensions will use less system resources.

And to give users greater visibility and control over how extensions use and share their data, in a future release we will be adopting a new install flow that allows users to withhold sensitive permissions at install time.

Check out developer.chrome.com for complete details, and how to migrate your current extension to manifest v3.

CSS aspect-ratio property

Normally, only some elements have an aspect ratio, for example images. For them, if only the width, or the height, is specified, the other is automatically computed using the intrinsic aspect ratio.

In Chrome 88, the aspect-ratio property allows you to explicitly specify an aspect ratio, enabling a similar behavior.

.square{

aspect-ratio:1/1;}

You can also use progressive enhancement to check if it’s supported in the browser, and apply a fallback if necessary. Then, with the new CSS 4 not selector, you can make your code a little cleaner!

.square{

aspect-ratio:1/1;}@supports not(aspect-ratio:1/1){

.square{

height:4rem;

width:4rem;

}}

Thanks to Jen Simmons for calling out this is supported in the latest Safari Technical Preview, so we should see it in Safari soon! And check out Una's demo to see it in action.

Heavy throttling of chained JS timers

Chrome 88 will heavily throttle chained Java timers for hidden pages in particular conditions. This will reduce CPU usage, which will also reduce battery usage. There are some edge cases where this will change behavior, but timers are often used where a different API would be more efficient, and more reliable.

That was pretty jargon heavy, and a bit ambiguous, so check out Jake's article Heavy throttling of chained JS timers beginning in Chrome 88 on developer.chrome.com for all the details.

Play billing in Trusted Web Activity

You can now use Play Billing in your Trusted Web Activity to sell digital goods and subions using the new Digital Goods API. It’s available as an origin trial in Chrome 88 on Android, and we expect it to expand the origin trial to Chrome OS in the next release.

Once your accounts are set-up, update your Trusted Web Activity to enable Play billing, and create your digital goods in the Play Developer Console. Then, in your PWA, add your origin trial token, and you’re ready to add the code to check for existing purchases, query for available purchases, and make new purchases.

// Get list of potential digital goodsconstitemService=

await window .getDigitalGoodsService("https://play.google.com/billing");constdetails=

await itemService .getDetails(['ripe_bananas','walnuts','pecans']);

Adriana and Andre go into more detail in their Chrome Dev Summit talk - What’s new for web apps in Play, or check out the docs.

And more

And of course there’s plenty more.

To conform to a change in the HTML standard, anchor tags with target="_blank" will now imply rel="no-opener" by default, this helps prevent tab-napping attacks.

Most operating systems enable mouse acceleration by default, but that can be a problem for some games. In Chrome 88, the Pointer Lock API allows you to disable mouse acceleration. That means the same physical motion, slow or fast, results in the same rotation, providing a better gaming experience and higher accuracy.

And addEventListener now takes an Abort Signal as an option. Calling abort removes that event listener, making it easy to shut down event listeners when no longer needed.Further reading

This covers only some of the key highlights. Check the links below for additional changes in Chrome 87.返回搜狐,查看更多

What's new in Chrome DevTools (88)

Chrome 88 deprecations & removals

ChromeStatus.com updates for Chrome 88

What's new in Java in Chrome 88

Chromium source repository change list

责任编辑:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值