j-NativeNotifications
- 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
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.
<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>