--- title: Notification.title slug: Web/API/Notification/title tags: - API - Notification - Notifications - Notifications API - Property - Reference - Title - プロパティ - 通知 translation_of: Web/API/Notification/title ---
{{APIRef("Web Notifications")}}{{AvailableInWorkers}}{{securecontext_header}}
title は {{domxref("Notification")}} インターフェイスの読取専用プロパティで、 {{domxref("Notification.Notification","Notification()")}} コンストラクターの title 引数で指定された通知のタイトルを示します。
var title = Notification.title;
{{domxref("DOMString")}} です。
function spawnNotification(theBody,theIcon,theTitle) {
var options = {
body: theBody,
icon: theIcon
}
var n = new Notification(theTitle,options);
console.log(n.title)
}
| 仕様書 | 状態 | 備考 |
|---|---|---|
| {{SpecName('Web Notifications','#dom-notification-title','title')}} | {{Spec2('Web Notifications')}} | Living standard |
{{Compat("api.Notification.title")}}