using javascript to start / stop polling

96 views
Skip to first unread message

Jim Santarius

unread,
Mar 26, 2018, 12:47:33 PM3/26/18
to intercooler-js
I'd like to be able to set a ic-src with ic-polling ="5s" and ic-pause-polling="true" then turn polling on or off just with javascript on client side. Can this be done?

Jim

Carson Gross

unread,
Mar 26, 2018, 12:57:19 PM3/26/18
to Jim Santarius, intercooler-js
Hi Jim,

Unfortunately that isn't part of the javascript API right now, I will expose the polling functions for the next release.

In the meantime, you could look at the source code for cancelPolling() and startPolling() to see how it works, and just copy those out.  Or, alternatively, you could expose those methods down in the API section at the bottom of your own copy of intercooler and access them.  (That's all I'm going to do to open that API up.)

Cheers,
Carson


On March 26, 2018 at 9:47:34 AM, Jim Santarius (ncc...@gmail.com) wrote:

I'd like to be able to set a ic-src with ic-polling ="5s" and ic-pause-polling="true" then turn polling on or off just with javascript on client side. Can this be done?

Jim
--
You received this message because you are subscribed to the Google Groups "intercooler-js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to intercooler-j...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anders Baumann

unread,
Mar 14, 2019, 2:21:52 AM3/14/19
to intercooler-js
I have created a pull request for exposing the polling methods in the API: https://github.com/intercoolerjs/intercooler-js/pull/277

Thanks,
Anders

Carson Gross

unread,
Mar 14, 2019, 1:33:59 PM3/14/19
to Anders Baumann, intercooler-js
Thank you!
Reply all
Reply to author
Forward
0 new messages