# j-NativeNotifications

> j-NativeNotifications: fácil de usar; singleton

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

- Singularidade


__Configuração__

- `timeout {Number}` deve conter um tempo (millisecundos) para a expiração da notificação (default: `8000`)
- `icon {String}` (opcional) um ícone (default `/icon.png`)

__Métodos__
- `component.append(title, message, [callback], [icon])` para criar uma nova notificação

__Uso__

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

Use-o com `<ui-component name="nativenotifications">`Quando o componente ainda não está carregado, jComponent Descarrega-o no primeiro uso do endereço `DEF.fallback` (a partir do Componentator CDN por padrão). autor: Peter Širka. fonte: o Componentator Reserva de componentes, licença 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>
```
