This is a string, and represents the type of notification to create. There are four types of notification: "basic", "image", "list", "progress".
This is passed into
notifications.create()
and
notifications.update()
作为
type
property of
NotificationOptions
.
Values of this type are strings. Possible values are:
"basic"
: the notification includes:
NotificationOptions.title
)
NotificationOptions.message
)
NotificationOptions.iconUrl
)
可选
NotificationOptions.contextMessage
)
可选
NotificationOptions.buttons
)
可选
"image"
: everything in
"basic"
and also:
NotificationOptions.imageUrl
)
"list"
: everything in
"basic"
and also:
NotificationOptions.items
)
"progress"
: everything in
"basic"
and also:
NotificationOptions.progress
)
Currently Firefox only supports "basic" here.
BCD tables only load in the browser
注意:
This API is based on Chromium's
chrome.notifications
API。
Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.
最后修改: , 由 MDN 贡献者