shortcuts - Web app manifests 编辑

TypeObject
MandatoryNo

The shortcuts member defines an array of shortcuts or links to key tasks or pages within a web app. A user agent can use these values to assemble a context menu to be displayed by the operating system when a user engages with the web app's icon. When user invokes a shortcut, the user agent will navigate to the address given by shortcut's url member.

Shortcut item values

Shortcut objects may contain the following values (only name and url are required):

MemberDescription
name A string that can be displayed to the user in a context menu.
short_nameA string that can be displayed where there is insufficient space to display the full name of the shortcut.
description A string that describes the purpose of the shortcut. It may be exposed to assistive technology.
url A URL within the application that opens when the shortcut is activated.
iconsA set of icons that represent the shortcut. They can be used, e.g., in the context menu.

Examples

The following is a list of shortcuts a calendar app might have:

"shortcuts" : [
  {
    "name": "Today's agenda",
    "url": "/today",
    "description": "List of events planned for today"
  },
  {
    "name": "New event",
    "url": "/create/event"
  },
  {
    "name": "New reminder",
    "url": "/create/reminder"
  }
]

Specifications

SpecificationStatusCommentFeedback

Web App Manifest
The definition of 'shortcuts' in that specification.

Working Draft

Initial definition.

Web App Manifest Working Group drafts

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:70 次

字数:3158

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文