From 7f901bb28bf11167bfb9882fb83103ee21e2129e Mon Sep 17 00:00:00 2001 From: Sean Doyle Date: Sun, 19 Jun 2022 12:13:12 -0400 Subject: [PATCH] Document the `turbo-frame[complete]` attribute Explain the `[complete]` attribute's behavior introduced in [hotwired/turbo#487][]. [hotwired/turbo#487]: https://github.com/hotwired/turbo/pull/487 --- _source/handbook/03_frames.md | 3 +++ _source/reference/frames.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/_source/handbook/03_frames.md b/_source/handbook/03_frames.md index cb2c8e6..871e21a 100644 --- a/_source/handbook/03_frames.md +++ b/_source/handbook/03_frames.md @@ -104,6 +104,9 @@ Note that the `` on `/emails/set_aside` does not contain a `src` at During navigation, a Frame will set `[aria-busy="true"]` on the `` element when fetching the new contents. When the navigation completes, the Frame will remove the `[aria-busy]` attribute. When navigating the `` through a `
` submission, Turbo will toggle the `[aria-busy="true"]` attribute in tandem with the Frame's. +After navigation finishes, a Frame will set the `[complete]` attribute on the +`` element. + [aria-busy]: https://www.w3.org/TR/wai-aria/#aria-busy ## Lazy-Loading Frames diff --git a/_source/reference/frames.md b/_source/reference/frames.md index 8de22d0..a522dad 100644 --- a/_source/reference/frames.md +++ b/_source/reference/frames.md @@ -114,6 +114,9 @@ attributes and JavaScript properties. * `target` refers to another `` element by ID to be navigated when a descendant `` is clicked. When `target="_top"`, navigate the window. +* `complete` is a boolean attribute whose presence or absence indicates whether + or not the `` element has finished navigating. + * `autoscroll` is a [boolean attribute][] that controls whether or not to scroll a `` element (and its descendant `` elements) into view when after loading. Control the scroll's vertical alignment by setting the