Notification.body
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Nota: Esta característica está disponible en Web Workers.
Contexto seguro: Esta función está disponible solo en contextos seguros (HTTPS), en algunos o todos los navegadores que lo soportan.
La propiedad body de solo lectura de la interfaz
Notification indica la cadena del cuerpo de la notificación, como
se especifica en la opción body del constructor
Notification().
Sintaxis
js
var body = Notification.body;
Valor
Un DOMString.
Ejemplos
js
function spawnNotification(theBody, theIcon, theTitle) {
var options = {
body: theBody,
icon: theIcon,
};
var n = new Notification(theTitle, options);
console.log(n.body);
}
Especificaciones
| Specification |
|---|
| Notifications API> # dom-notification-body> |
Compatibilidad del navegador
Loading…