-
Notifications
You must be signed in to change notification settings - Fork 0
Notifier
Eric edited this page Jul 12, 2024
·
6 revisions
Notifier is a component to display a sliding notification on the body of the page. These are the default settings
const notifier = new OGX.Notifier({
message:'<span class="title">{{$title}}</span><span class="body">{{$body}}</span>',
el:'body',
read_time:4000,
interval:1000
});
myUxi.add(notifier);
Add new notification to the queue (
callback
is optional)
notifier.add({title:'New Player', body:'John Doe has joined the game!', callback: function(){} });
Clear the whole queue
notifier.clear();
Enable/disable
notifier.enable();
notifier.disable();
When the end use taps/click the notification, an event is broadcasted with the original notification
OGX.Notifier.TAP