Liking cljdoc? Tell your friends :D
Clojure only.

nedap.reloaded.browser-refresh.api


wrap-refreshclj

(wrap-refresh handler refresh-time)

This middleware adds an auto-refresh JS script to html responses, that will be triggered on Reloaded reset.

It is unnecesary to integrate this middleware as a Sierra Component: detection of updates is automatic.

refresh-time is the how often should the JS poll the server. e.g. 50 (ms) is fine. Note that by design the responses are blocking, taking up to 60s, so in practice a value of 50ms will not be noisy at all.

NOTE: it is assumed (and required) that handler will be wrapped with ring.middleware.params/wrap-params.

This middleware adds an auto-refresh JS script to html responses,
that will be triggered on Reloaded `reset`.

It is unnecesary to integrate this middleware as a Sierra Component: detection of updates is automatic.

`refresh-time` is the how often should the JS poll the server. e.g. 50 (ms) is fine.
Note that by design the responses are blocking, taking up to 60s,
so in practice a value of 50ms will not be noisy at all.

NOTE: it is assumed (and required) that `handler` will be wrapped with `ring.middleware.params/wrap-params`.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close