将Progressive Web Apps添加到App抽屉/托盘

时间:2018-03-15 15:29:15

标签: javascript google-chrome web progressive-web-apps

如何将渐进式Web应用程序添加到应用程序抽屉中,而不仅限于主屏幕。这是我的清单文件。一个例子是twitter web应用程序,它也可以添加到主屏幕和app抽屉。我不知道是否应该添加到此网络清单中。

{
"name": "Weather",
"short_name": "Weather",
"icons": [{
  "src": "images/icons/icon-128x128.png",
    "sizes": "128x128",
    "type": "image/png"
  }, {
    "src": "images/icons/icon-144x144.png",
    "sizes": "144x144",
    "type": "image/png"
  }, {
    "src": "images/icons/icon-152x152.png",
    "sizes": "152x152",
    "type": "image/png"
  }, {
    "src": "images/icons/icon-192x192.png",
    "sizes": "192x192",
    "type": "image/png"
  }, {
    "src": "images/icons/icon-256x256.png",
    "sizes": "256x256",
    "type": "image/png"
  }],
 "start_url": "/index.html",
 "display": "standalone",
 "background_color": "#3E4EB8",
 "theme_color": "#2F3BA2"
}

2 个答案:

答案 0 :(得分:0)

您无需在清单文件中定义scope属性并使用Chrome v59或更高版本: https://www.w3.org/TR/appmanifest/#scope-member

查看改进的文档"添加到主屏幕": https://developers.google.com/web/updates/2017/02/improved-add-to-home-screen

答案 1 :(得分:0)

我必须更新我的chrome浏览器并在清单文件中定义一个范围属性,