j-NativeNotifications
- Singleton
Configuratie
timeout {Number}moet een timeout (milliseconden) bevatten voor de verstrijking van de kennisgeving (default:8000)icon {String}(optional) een icoon (default/icon.png)
Methoden
component.append(title, message, [callback], [icon])voor het creëren van een nieuwe kennisgeving
Gebruik
SETTER('nativenotifications/show', 'TITLE', 'MESSAGE', function() {
// optional, click
}, '/img/warning-optional.png');Gebruik het met <ui-component name="nativenotifications">Wanneer de component nog niet is geladen, jComponent Download het op eerste gebruik van het adres in DEF.fallback (De Componentator Schrijver: Peter Širka. bron: de Componentator Componenten repository, MIT licentie.
<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>