# j-NativeNotifications

> j-NativeNotifications: facile da usare; singletone

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: it
Content-SHA256: 01e81db1a2690fd7403bf878bcbe7a20024f6408e4efb81975df7370a05c0786
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

- singolo


__Configurazione__

- `timeout {Number}` deve contenere un tempo di scadenza (millisecondi) per l'esecuzione della notifica (default: `8000`)
- `icon {String}` (opzionale) un'icona (default `/icon.png`)

__Metodi__
- `component.append(title, message, [callback], [icon])` per creare una nuova notifica

__Utilizzo__

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

Utilizzare con `<ui-component name="nativenotifications">`Quando il componente non è ancora caricato, jComponent Scarica il codice in prima utilizzazione dall'indirizzo `DEF.fallback` (Il Componentator La storia di Peter Širka.Fonte: il Componentator Ristorante dei componenti, licenza 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>
```
