This event is emitted before a polling fragment is reloaded from the server.
Listener may prevent the up:fragment:poll
event to prevent the fragment from being reloaded.
Preventing the event will only skip a single update:
up.on('up:fragment:poll', function(event) {
// Don't reload a fragment that contains a playing video
let video = event.target.querySelector('video')
if (video && !video.paused) {
event.preventDefault()
}
})
The server will be polled again after the configured interval, emitting another up:fragment:poll
event.
An object with render options for the render pass that reloads the polling fragment.
Listeners may inspect and modify these options.
Prevents the fragment from being reloaded.