backbone-poller icon indicating copy to clipboard operation
backbone-poller copied to clipboard

Can it change options once it is started, especially delay?

Open cardinal27513 opened this issue 14 years ago • 2 comments

Thinking to have settings to control delay.. and it can be user set value.. Seems delay can only be set during initialization??

cardinal27513 avatar May 02 '12 02:05 cardinal27513

You can also set it with the getPoller() method:

var poller = PollingManager.getPoller(model, {delay: 100}).start();
// change the delay to 200
poller = PollingManager.getPoller(model, {delay: 200}).start();

This will technically stop the poller and start it with the new variable for delay

uzikilon avatar May 02 '12 05:05 uzikilon

Thanks.. I was under the wrong impression that getPoller will return different instance when it is called.

cardinal27513 avatar May 03 '12 01:05 cardinal27513