diff --git a/src/core/frames/frame_controller.js b/src/core/frames/frame_controller.js index 5940ba761..02358d123 100644 --- a/src/core/frames/frame_controller.js +++ b/src/core/frames/frame_controller.js @@ -258,7 +258,7 @@ export class FrameController { // View delegate - allowsImmediateRender({ element: newFrame }, _isPreview, options) { + allowsImmediateRender({ element: newFrame }, options) { const event = dispatch("turbo:before-frame-render", { target: this.element, detail: { newFrame, ...options }, diff --git a/src/core/session.js b/src/core/session.js index bf653539a..8dafa6f13 100644 --- a/src/core/session.js +++ b/src/core/session.js @@ -298,8 +298,8 @@ export class Session { } } - allowsImmediateRender({ element }, isPreview, options) { - const event = this.notifyApplicationBeforeRender(element, isPreview, options) + allowsImmediateRender({ element }, options) { + const event = this.notifyApplicationBeforeRender(element, options) const { defaultPrevented, detail: { render } @@ -312,9 +312,9 @@ export class Session { return !defaultPrevented } - viewRenderedSnapshot(_snapshot, isPreview, renderMethod) { + viewRenderedSnapshot(_snapshot, _isPreview, renderMethod) { this.view.lastRenderedLocation = this.history.location - this.notifyApplicationAfterRender(isPreview, renderMethod) + this.notifyApplicationAfterRender(renderMethod) } preloadOnLoadLinksForView(element) { @@ -370,15 +370,15 @@ export class Session { return dispatch("turbo:before-cache") } - notifyApplicationBeforeRender(newBody, isPreview, options) { + notifyApplicationBeforeRender(newBody, options) { return dispatch("turbo:before-render", { - detail: { newBody, isPreview, ...options }, + detail: { newBody, ...options }, cancelable: true }) } - notifyApplicationAfterRender(isPreview, renderMethod) { - return dispatch("turbo:render", { detail: { isPreview, renderMethod } }) + notifyApplicationAfterRender(renderMethod) { + return dispatch("turbo:render", { detail: { renderMethod } }) } notifyApplicationAfterPageLoad(timing = {}) { diff --git a/src/core/view.js b/src/core/view.js index d077e9a24..8c5ae2e82 100644 --- a/src/core/view.js +++ b/src/core/view.js @@ -65,7 +65,7 @@ export class View { const renderInterception = new Promise((resolve) => (this.#resolveInterceptionPromise = resolve)) const options = { resume: this.#resolveInterceptionPromise, render: this.renderer.renderElement } - const immediateRender = this.delegate.allowsImmediateRender(snapshot, isPreview, options) + const immediateRender = this.delegate.allowsImmediateRender(snapshot, options) if (!immediateRender) await renderInterception await this.renderSnapshot(renderer)