From 19934e3a4df2453e387d339cdd238146e0d0d939 Mon Sep 17 00:00:00 2001 From: David Brito <39559632+davbrito@users.noreply.github.com> Date: Thu, 10 Feb 2022 13:13:29 -0400 Subject: Translate /API/Notification/icon [es] (#4066) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Translate /API/Notification/icon [es] Co-authored-by: Juan Vásquez Co-authored-by: Anderson Vallejo <48649209+Vallejoanderson@users.noreply.github.com> --- files/es/web/api/notification/icon/index.md | 52 +++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 files/es/web/api/notification/icon/index.md (limited to 'files/es/web/api/notification/icon/index.md') diff --git a/files/es/web/api/notification/icon/index.md b/files/es/web/api/notification/icon/index.md new file mode 100644 index 0000000000..6adafe83ee --- /dev/null +++ b/files/es/web/api/notification/icon/index.md @@ -0,0 +1,52 @@ +--- +title: Notification.icon +slug: Web/API/Notification/icon +translation_of: Web/API/Notification/icon +browser-compat: api.Notification.icon +--- +{{APIRef("Web Notifications")}}{{AvailableInWorkers}}{{securecontext_header}} + +La propiedad de solo lectura **`icon`** de la interfaz +[`Notification`](/es/docs/Web/API/Notification) contiene la URL de un ícono que +se mostrará como parte de la notificación, como se especifica en la opción +`icon` del constructor +[`Notification()`](/es/docs/Web/API/Notification/Notification). + +## Sintaxis + +```js +var icon = Notification.icon; +``` + +### Valor + +Un [`USVString`](/es/docs/Web/API/USVString). + +## Ejemplos + +En nuestra +[aplicación de lista de tareas pendientes](https://github.com/mdn/to-do-notifications/tree/gh-pages) +([ver la aplicación ejecutándose en vivo](https://mdn.github.io/to-do-notifications/)), +usamos el constructor +[`Notification()`](/es/docs/Web/API/Notification/Notification) para disparar una +notificación, pasandole los argumentos que especifican el cuerpo, ícono y +título que queremos. + +```js +var notification = new Notification("Lista de tareas pendientes", { + body: text, + icon: img, +}); +``` + +## Especificaciones + +{{Specifications}} + +## Compatibilidad con navegadores + +{{Compat}} + +## Véase también + +- [Usando la API de Notificaciones](/es/docs/Web/API/Notifications_API/Using_the_Notifications_API) -- cgit v1.2.3-54-g00ecf