Skip to content

Commit

Permalink
omit turbo:before-frame-cache event
Browse files Browse the repository at this point in the history
  • Loading branch information
seanpdoyle committed Mar 6, 2021
1 parent 8f463d6 commit 9afbd3b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/core/frames/frame_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ export class FrameController implements AppearanceObserverDelegate, FetchRequest
// View delegate

viewWillRenderSnapshot(snapshot: Snapshot, isPreview: boolean) {
dispatch("turbo:before-frame-cache", { target: this.element })
dispatch("turbo:before-frame-render", { target: this.element, detail: { newFrame: snapshot.element } })
}

Expand Down
2 changes: 0 additions & 2 deletions src/tests/functional/frame_navigation_tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export class FrameNavigationTests extends TurboDriveTestCase {
const { url } = await this.nextEventOnTarget("frame", "turbo:before-frame-visit")
this.assert.ok(url.includes(href))
await this.nextEventOnTarget("frame", "turbo:frame-visit")
await this.nextEventOnTarget("frame", "turbo:before-frame-cache")

const beforeFrameRender = await this.nextEventOnTarget("frame", "turbo:before-frame-render")
this.assert.ok("newFrame" in beforeFrameRender, "reference the new snapshot")
Expand All @@ -33,7 +32,6 @@ export class FrameNavigationTests extends TurboDriveTestCase {
const { url } = await this.nextEventOnTarget("frame", "turbo:before-frame-visit")
this.assert.ok(url.includes(href))
await this.nextEventOnTarget("frame", "turbo:frame-visit")
await this.nextEventOnTarget("frame", "turbo:before-frame-cache")

const beforeFrameRender = await this.nextEventOnTarget("frame", "turbo:before-frame-render")
this.assert.ok("newFrame" in beforeFrameRender, "reference the new snapshot")
Expand Down

0 comments on commit 9afbd3b

Please sign in to comment.