Notification:title 属性
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
备注: 此特性在 Web Worker 中可用。
Notification
接口的 title
只读属性指示通知的标题。此属性通过 Notification()
构造函数的 title
参数指定。
值
一个字符串。
示例
js
function spawnNotification(theBody, theIcon, theTitle) {
const options = {
body: theBody,
icon: theIcon,
};
const n = new Notification(theTitle, options);
console.log(n.title);
}
规范
Specification |
---|
Notifications API # dom-notification-title |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
title |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.