xtify reactor onBeforeMessage is not working -


i using reactor http://getreactor.xtify.com/ on backbone application , trying build custom inbox box. use auto-run="false" config param. define function onbeforemessage

reactor.onbeforemessage(function(message){ console.log('new message'); }); 

this function of times been called other not. first question why onbeforemessage triggered although specify auto-run="false" ? second question why onbeforemessage not triggered ?

you'll need use:

data-auto-run="false" 

instead of:

auto-run="false" 

the 'data-' prefix the html5 way store metadata on html element.

you can see js fiddle in-depth explanation of how implement custom inbox here:

http://goo.gl/8ej9vm

note function register reactor.onbeforemessage() accepts list of messages have been triggered rather single message. can see more documentation here:

http://getreactor.xtify.com/documentation/notifications.php


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -