# j-NativeNotifications

> j-NativeNotifications: fácil uso; singleton

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: es
Content-SHA256: 05f53d12d1db1731f42cb85b14b455ee9814ac59017c933452d0d8bc6679570b
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

- singleton


__Configuración__

- `timeout {Number}` debe contener un tiempo de espera (milisegundos) para la expiración de la notificación (predeterminado: `8000`)
- `icon {String}` (opcional) un icono (por defecto `/icon.png`)

__Métodos__
- `component.append(title, message, [callback], [icon])` por crear una nueva notificación

__Uso__

```javascript
SETTER('nativenotifications/show', 'TITLE', 'MESSAGE', function() {
    // optional, click
}, '/img/warning-optional.png');
```

Úselo con `<ui-component name="nativenotifications">`. Cuando el componente aún no está cargado, jComponent lo descarga en el primer uso desde la dirección en `DEF.fallback` (la CDN Componentator de forma predeterminada). Autor: Peter Širka. Fuente: repositorio de componentes Componentator, licencia MIT.

```html example.html
<ui-component name="nativenotifications" path="allowNotifications"></ui-component>

<script>
	var allowNotifications = true;

	setTimeout(function() {
		SETTER('nativenotifications/append', 'Hello!', 'jComponent is a great solution for everyone.', null, 'https://messenger.totaljs.com/icon.png');
	}, 3000);
</script>
```
