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

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

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
body

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
See implementation notes.

See also