Chrome 88 發布!

2021-02-14 北京GDG

原文連結: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 JavaScript 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.

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.

<!-- Height is auto-computed from width & aspect ratio --><img src="..." style="width: 800px;">

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 JavaScript 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 subscriptions 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 goodsconst itemService =
  await window.getDigitalGoodsService("https://play.google.com/billing");const details =
  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 JavaScript in Chrome 88

Chromium source repository change list

相關焦點

  • Google Chrome 88更新!這個功能終於可以使用了!
    THE STARTGoogle Chrome 88版本更新
  • Chrome Canary引入新實驗功能:標籤欄上可滾動訪問標籤頁
    _88.0.4284.0/88.0.4284.0_chrome_installer.exehttps://dl.google.com/release2/chrome/cV2KABiEuYAbHM6mS9chQA_88.0.4284.0/88.0.4284.0_chrome_installer.exehttp://www.google.com/dl/
  • Google Chrome 81.0.4044.113 發布
    Chrome 官方正式版離線安裝包下載直連(無需代理訪問) Google Chrome 81.0.4044.113  32位/64位(2020/04/16)http://redirector.gvt1.com/edgedl/release2/chrome
  • 谷歌被國會拷問數據隱私 Chrome瀏覽器「頂風作惡」
    近日,就在谷歌出席國會召開的數據隱私聽證會前夕,chrome瀏覽器發布的更新版「chrome 69」卻撞上槍口,被曝利用瀏覽器默認設置強行搜集用戶數據,引發美國朝野的強烈不滿。9月23日,美國霍普金斯大學密碼學教授Matthew Green發表博客文章,標題為「Why I’m done with chrome(我為何棄用chrome瀏覽器)」,指出了chrome 69新功能中一個微妙的變化:凡是登錄谷歌旗下其他產品的用戶,都會自動登錄到chrome瀏覽器。
  • Chrome 88徹底禁用Flash!到底應該怎麼辦?
    在驚嘆Chrome的版本號刷到將近100的同時,我們需要特別注意,這個版本的Chrome徹底禁用了Flash!我們知道其實從數年前,業界就已經預告過將會在2021年對Flash棄療,現在Chrome 88禁用Flash也在情理之中。  然而,仍有少量用戶是不得不使用Flash的。
  • 終於等到你 Chrome85版本升級至64位
    7月6日消息,安卓早在2014年的安卓5.0就已支持64位軟體,而時至今日,自家的chrome瀏覽器在安卓仍然是32位軟體,從而導致在使用這些應用程式時的效能沒有獲得發揮,安全性也較差。不過,據外媒 xda-developers 報導,谷歌將在chrome 85版本開始,在安卓10及更高版本的手機上升級至64位,截至今年4月,安卓10的用戶不足8%,所以能夠體驗到64位chrome的用戶不會很多。
  • Chrome 瀏覽器大更新!標籤頁管理超好用,加載速度提升 10%
    在 8 月 25 日發布的大版本更新中,Chrome 發布了不少可以提升效率的功能,比如選項卡分類、選項卡預覽、跨平臺傳送……雖然它們看起來與「提升效率」不沾邊,但卻實實在在地節省了使用者的時間。但摺疊標籤分組的功能需要手動開啟,具體開啟方法為:先進入「chrome://flags/#tab-groups」設定頁面,將「Tab Groups」選為「Enable」狀態。
  • Google Chrome瀏覽器官網下載
    Google Chrome瀏覽器官網下載特點:不易崩潰chrome最大的亮點就是其多進程架構,保護瀏覽器不會因惡意網頁和應用軟體而崩潰。每個標籤、窗口和插件都在各自的環境中運行,因此一個站點出了問題不會影響打開其它站點。通過將每個站點和應用軟體限制在一個封閉的環境中這種架構,這進一步提高了系統的安全性。
  • Chrome 瀏覽器大更新!標籤頁管理超好用,加載速度提升 10% | 愛範兒
    在 8 月 25 日發布的大版本更新中,Chrome 發布了不少可以提升效率的功能,比如選項卡分類、選項卡預覽、跨平臺傳送……雖然它們看起來與「提升效率」不沾邊,但卻實實在在地節省了使用者的時間。但摺疊標籤分組的功能需要手動開啟,具體開啟方法為:先進入「chrome://flags/#tab-groups」設定頁面,將「Tab Groups」選為「Enable」狀態。再進入「chrome://flags/#tab-groups-collapse」設定頁面,將「Tab Groups Collapse」選為「Enable」狀態。
  • Chrome 沒插件,香味少一半,用Chrome瀏覽器這些插件怎麼能沒有
    俗話說Chrome 沒插件,香味少一半,Chrome 最大的優勢還是其支持眾多強大好用的擴展程序,使用Chrome瀏覽器的最大魅力就是插件了,今天,小編就來一起盤點一下chrome上那些相見恨晚的擴展。
  • Chrome開始完善隱私沙盒功能 去第三方cookies
    重啟瀏覽器  只有用戶可以導航至「設置>隱私和安全」或者直接在地址欄上輸入「chrome://settings/privacySandbox」,來啟用隱私沙盒。不過目前 Chrome Canary 版本的隱私沙盒功能還未完善,僅僅只是一個佔位符,未來需要更多的代碼進行完善。這項功能預估會在 2022 年推出。
  • Chrome引入Live Captions功能:提供實時字幕 - 太平洋電腦網
    訪問chrome://flags頁面  3. 搜索"Live Captions"  4. 從下拉菜單中選擇 "已啟用"並重新啟動瀏覽器。  5. 單擊菜單 > 設置 > 高級 > 輔助功能 > 啟用實時字幕。  6. 訪問 YouTube 或 SoundCloud ,播放任意視頻/音頻,Chrome 開始以瀏覽器默認語言(英語)顯示字幕。
  • 跳脫色彩的情懷相機:徠卡Q2 Monochrome評測
    所以,徠卡在數碼時代,推出了M-Monochrome系列產品,以獨特的黑白傳感器,旨在讓攝影師用這樣的相機體驗黑白攝影的魅力。作為徠卡全畫幅便攜相機的代表產品徠卡Q系列,有著更廣泛的用戶群體,如今徠卡把自家黑白機產品線也帶到了Q系列上,徠卡Q2 Monochrome(下文簡稱:徠卡Q2黑白機)黑白相機的出現,讓徠卡Q系列產品線與M系列一樣,變得更加豐富了。
  • 「隱藏技巧」Chrome、Edge拖入安裝.crx 擴展
    用慣chrome的都知道,由於擴展商城在國內無法直接訪問,所以也就無法直接安裝.crx擴展,一般都是去國內的第三方網站搜索擴展並下載下來安裝,這時候就需要修改文件後綴名,再解壓出來安裝,相當麻煩,但其實,下載下來的.crx文件也是可以直接拖入安裝的,只需要執行一步簡單的操作。
  • 你真的會玩Chrome嗎?谷歌實驗室了解一下!
    在地址欄輸入:chrome://flags/ 即可打開實驗室,本文使用的版本為79.0.3945.88,版本不同,功能可能不同。也許後面幾個版本,下面的實驗功能,已經標配了。在這個頁面中,有兩個標籤頁,Available為可用功能,旁邊則為不可用功能。
  • Google Chrome,受夠「請停用以開發者模式運行的擴展程序」了
    Google Chrome,受夠「請停用以開發者模式運行的擴展程序」了 嗨,大家好,今天給大家分享經常使用Google chrome瀏覽器出現的一個問題,那就是打開後彈出【請停用以開發者模式運行的擴展程序】窗口。
  • 新品發布 | 拎起就走的88鍵鋼琴:GO:PIANO88來啦!
    學習鋼琴的你一定非常渴望擁有一臺88鍵的鋼琴,那是因為88鍵全尺寸鍵盤更有助於鋼琴演奏手法的練習,俗稱為「88鍵的肌肉記憶」。同時由於現代都市生活的快節奏,你也一定希望能夠越輕便越好。這個在性能與便攜性之間的選擇該如何開始呢?今日Roland羅蘭發布了一款可攜式全尺寸88鍵數碼鋼琴——GO:PIANO88。
  • chrome插件:您的瀏覽器不僅可以瀏覽網頁
    我想推薦幾個自用的chrome插件,涵蓋學習和娛樂。有了這些插件,您可以大大提高使用瀏覽器的滿意度。目前許多瀏覽器可以安裝插件,以chrome基於內核的瀏覽器為例安裝listen1。下面將以chrome瀏覽器為例安裝AdBlock插件。Listen1支持全網音樂播放,也支持所有平臺歌曲列表的導入。當我導入網易雲列表時,我發現我需要做一個小的更改。
  • chrome插件:你的瀏覽器,不是只能瀏覽網頁!
    今天給大家推薦幾個自用chrome插件,涵蓋學習娛樂,日常生活中使用頻率比較高。有了這些插件,能很大程度提高使用瀏覽器的滿足感。目前許多瀏覽器都可以安裝插件,以基於chrome內核的瀏覽器為例安裝listen1。下文會以chrome瀏覽器為例安裝AdBlock插件。Listen1支持全網音樂播放,還支持所有平臺歌單導入。但是我在導入網易雲歌單時,發現需要做個小改動才行。
  • Chrome Extension 檢查視圖(無效)處理方法
    最近閒來無事,簡單看了下Chrome擴展的開發,並且開發一個小小的翻譯插件(TranslateBao)作為練手,開發細節不詳述了,如果有新學習chrome extension開發的新人,可以參考源碼,並歡迎提出寶貴意見,共同進步。