up.radio up:fragment:poll
DOM event

This event is emitted before a polling fragment is reloaded from the server.

Listeners 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.


Event properties

event.target
required

The polling fragment.

Type: Element
event.renderOptions
required

An object with render options for the render pass that reloads the polling fragment.

Listeners may inspect and modify these options.

Type: Object
event.preventDefault()
required

Prevents the fragment from being reloaded.