From 3f959b8f5f501e984f9d4d6b220e4ee4eba2b55e Mon Sep 17 00:00:00 2001 From: David Brito <39559632+davbrito@users.noreply.github.com> Date: Fri, 4 Feb 2022 12:09:55 -0400 Subject: Update notification body [es] (#3989) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update notification body [es] * Apply suggestions from code review Co-authored-by: Juan Vásquez Co-authored-by: Juan Vásquez --- files/es/web/api/notification/body/index.md | 53 +++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 files/es/web/api/notification/body/index.md (limited to 'files/es/web/api/notification/body/index.md') diff --git a/files/es/web/api/notification/body/index.md b/files/es/web/api/notification/body/index.md new file mode 100644 index 0000000000..6b184c6500 --- /dev/null +++ b/files/es/web/api/notification/body/index.md @@ -0,0 +1,53 @@ +--- +title: Notification.body +slug: Web/API/notification/body +tags: + - API + - API Notificaciones + - Javascript Notificador + - Notificaciones +translation_of: Web/API/Notification/body +--- +{{APIRef("Web Notifications")}}{{AvailableInWorkers}}{{securecontext_header}} + +La propiedad **`body`** de solo lectura de la interfaz +{{domxref("Notification")}} indica la cadena del cuerpo de la notificación, como +se especifica en la opción `body` del constructor +{{domxref("Notification.Notification","Notification()")}}. + +## Sintaxis + +```js +var body = Notification.body; +``` + +### Valor + +Un {{domxref("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 + +{{Specifications}} + +## Compatibilidad del navegador + +{{Compat}} + +## See also + +- [Usando la API de notificaciones](/es/docs/Web/API/Notifications_API/Using_the_Notifications_API) + -- cgit v1.2.3-54-g00ecf