---
name: "up:fragment:poll"
area: "API"
kind: "DOM event"
parent: "up.radio module"
url: "https://unpoly.com/api/up:fragment:poll"
---
<nav aria-label="Unpoly docs">[All docs](https://unpoly.com/index.md) · [up.radio module](https://unpoly.com/api/up.radio.md)</nav>

# up:fragment:poll

This event is emitted before a [polling](https://unpoly.com/api/up-poll.md) 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:

```js
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.

<nav aria-label="Guides">

- [Learn: Polling](https://unpoly.com/learn/polling.md#preventing-request)

</nav>

---

## Event properties {#properties}

### event.target {#event.target}

(required)

The polling fragment.

Type: [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element)

### event.renderOptions {#event.renderOptions}

(required)

An object with [render options](https://unpoly.com/api/up.render.md#parameters) for the render pass that reloads the polling fragment.

Listeners may inspect and modify these options.

Type: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects)

### event.preventDefault() {#event.preventDefault}

(required)

Prevents the fragment from being reloaded.

