TurboFrameRefreshController
Purpose
Refresh the contents of a remote turbo frame.
Actions
| Action | Purpose |
|---|---|
refresh | Sets the src of the connected <TurboFrame> to the same value it already has, triggering a content re-load |
Targets
| Target | Purpose | Default |
|---|---|---|
- | - | - |
Classes
| Class | Purpose | Default |
|---|---|---|
- | - | - |
Values
| Value | Type | Description | Default |
|---|---|---|---|
poll | Boolean | Whether the the <turbo-frame> should periodically refresh itself | false |
interval (Optional) | Number | The time, in milliseconds, between each refresh of the frame. | - |
Events
| Event | When | Dispatched on | event.detail |
|---|---|---|---|
- | - | - | - |
Side Effects
Sets a timeout on the window using setTimeout if pollValue is true.
How to Use
HTML
<turbo-frame src="/feed" data-controller="turbo-frame-refresh" data-turbo-frame-refresh-poll-value="true" data-turbo-frame-refresh-interval-value="10000" />