mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-02-21 20:20:34 +09:00
17 lines
355 B
JavaScript
17 lines
355 B
JavaScript
import { Controller } from "@hotwired/stimulus"
|
|
import { onNextEventLoopTick } from "helpers/timing_helpers"
|
|
|
|
export default class extends Controller {
|
|
unpermanize() {
|
|
delete this.element.dataset.turboPermanent
|
|
}
|
|
|
|
reload() {
|
|
this.element.reload()
|
|
}
|
|
|
|
load({ params: { url }}) {
|
|
onNextEventLoopTick(() => this.element.src = url)
|
|
}
|
|
}
|