manifest.json 显示 属性 有无效的浏览器选项

manifest.json display property has invalid option of browser

documentation 似乎说明 "display" 属性 在 manifest.json 中有四个选项:全屏、独立、最小-ui和浏览器

我决定为我的一个应用程序使用 'browser',但是来自 Chrome(版本 76)的消息说“Manifest 'display' 属性必须是 'standalone'、'fullscreen' 或 'minimal-ui' 之一”。如果我未定义 'display',也会出现该消息。

'browser' 是一个过时的选项还是它还没有进入最新的 Chrome 版本?

(我可能应该提到该消息出现在 Chrome DevTools>application>manifest 中)。

根据 https://developer.mozilla.org/en-US/docs/Web/Manifest/display.

,显示的有效选项为 fullscreenstandaloneminimal-uibrowser

为了显示添加到主屏幕提示,显示必须设置为以下之一:fullscreenstandaloneminimal-ui,参见 https://developers.google.com/web/fundamentals/app-install-banners/

browser 显示选项就像将字段留空。

当您使用 standalone 时,它看起来像本机应用程序。当你使用 fullscreen 时,没有状态栏等。可能你想使用 standalone,因为 fullscreen 有非常具体的用例(例如游戏)。

我终于抽出时间将其报告为错误。

https://bugs.chromium.org/p/chromium/issues/detail?id=1330323