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
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
body |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.