From 8f01b48fa20322cb77c1db2ecd786be2c1026fce Mon Sep 17 00:00:00 2001 From: Sean Doyle Date: Tue, 9 Nov 2021 10:23:17 -0500 Subject: [PATCH] Document Frame Visit Actions Document the changes proposed in [hotwired/turbo#398][]. [hotwired/turbo#398]: https://github.com/hotwired/turbo/pull/398 --- _source/handbook/03_frames.md | 37 +++++++++++++++++++++++++++++++++++ _source/reference/frames.md | 9 +++++++++ 2 files changed, 46 insertions(+) diff --git a/_source/handbook/03_frames.md b/_source/handbook/03_frames.md index 6b237c1..5aa7c5c 100644 --- a/_source/handbook/03_frames.md +++ b/_source/handbook/03_frames.md @@ -165,3 +165,40 @@ Sometimes you want most links to operate within the frame context, but not other ``` + +## Promoting a Frame Navigation to a Page Visit + +Navigating Frames provides applications with an opportunity to change part of +the page's contents while preserving the rest of the document's state (for +example, its current scroll position or focused element). There are times when +we want changes to a Frame to also affect the browser's [history][]. + +To promote a Frame navigation to a Visit, render the element with the +`[data-turbo-action]` attribute. The attribute supports all [Visit][] values, +and can be declared on: + +* the `` element +* any `` elements that navigate the `` +* any `
` elements that navigate the `` +* any `` or `