up.radio
JavaScript namespace
Features to update fragments without a user click.
An element with [up-hungry] is updated whenever a server response contains a matching element, even when the response was requested for a different target. This keeps things like unread counters current with every request. [up-flashes] builds on this to show confirmations and alerts from any response, including responses rendered in an overlay. An element with [up-poll] reloads itself from the server periodically, and up:fragment:poll lets your code skip a scheduled reload.
Features
-
[up-flashes] ATTR
Use an
[up-flashes]element to show confirmations, alerts or warnings. -
up:fragment:hungry EVENT
Before an
[up-hungry]element is added to a render pass, an eventup:fragment:hungryis emitted on that element. -
up:fragment:poll EVENT
This event is emitted before a polling fragment is reloaded from the server.
-
[up-hungry] ATTR
Elements with an
[up-hungry]attribute are updated whenever the server sends a matching element, even if the element is not targeted. -
[up-poll] ATTR
Elements with an
[up-poll]attribute are reloaded from the server periodically. -
up.radio.config CONFIG
Configures defaults for passive updates.
-
Starts polling the given element.
-
Stops polling the given element.