1. 面向开发者的 Web 技术
  2. Web API
  3. Notification
  4. Notification:title 属性

此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in English Always switch to English

Notification:title 属性

有限可用

此特性不属于基线,因为它尚未在主流浏览器中得到支持。

Want more support for this feature? Tell us why.

安全上下文: 此特性仅在一些支持的浏览器安全上下文(HTTPS)中可用。

备注: 此特性在 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);
}

规范

规范
Notifications API
# dom-notification-title

浏览器兼容性

参见

帮助改进 MDN

了解如何参与贡献

此页面最后更新于 ,由 MDN 贡献者更新。

AltStyle によって変換されたページ (->オリジナル) /