Notification.body

Nota: Esta característica está disponible en Web Workers.

Contexto seguro: Esta función está disponible solo en contextos seguros (en-US) (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() (en-US).

Sintaxis

js
var body = Notification.body;

Valor

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 Standard
# dom-notification-body

Compatibilidad del navegador

BCD tables only load in the browser

See also