From 38472253bdae9fa5f8709fa502ec195945d8570f Mon Sep 17 00:00:00 2001
From: David Bokan body element)
Note: A <{body}> element that is potentially scrollable might not have a scrolling box.
For instance, it could have a used value of 'overflow' being ''overflow/auto'' but not have its content overflowing its content area.
-A scrolling box of a viewport or element has two overflow directions, which are the block-end and inline-end directions for that viewport or element.
+A scrolling box of a viewport or element has two overflow directions, which are the block-end and inline-end directions for that viewport or element.
Note that the initial scroll position might not be aligned with the [=scrolling area origin=]
depending on the [=content-distribution properties=], see [[css-align-3#overflow-scroll-position]].
@@ -337,8 +337,8 @@ the following steps must be run:
'scroll-behavior' property is ''scroll-behavior/smooth''
smooth
- ...then perform a smooth scroll of box to position. Once the position has finished updating, emit the scrollend event.
- Otherwise, perform an instant scroll of box to position. After an instant scroll emit the scrollend event.
+ ...then perform a smooth scroll of box to position. Once the position has finished updating, emit the scrollend event.
+ Otherwise, perform an instant scroll of box to position. After an instant scroll emit the scrollend event.
Scroll is completed when the scroll position has no more pending updates or translations. This includes smooth or instant mouse wheel scrolling, keyboard scrolling, scroll-snap events, or other APIs and gestures which cause the scroll position to update and possibly interpolate.
@@ -1669,6 +1669,8 @@ This section integrates with the event loop defined in HTML. [[!HTM
Each {{Document}} has an associated list of pending scroll event targets, initially empty.
+Each {{Document}} has an associated list of pending scrollend event targets, initially empty.
+
Whenever a viewport gets scrolled (whether in response to user interaction or by an API), the user agent must run these steps:
1. Let doc be the viewport’s associated {{Document}}.
@@ -1693,7 +1695,7 @@ When asked to run the scroll steps for a {{Docume
Whenever scrolling is completed, the user agent must run these steps:
1. If scrolling was done on a viewport, let doc be the viewport’s associated {{Document}} and target be the viewport.
-Otherwise, scrolling is done on an element and let doc be the element's node document and target be the element.
+ Otherwise, scrolling is done on an element and let doc be the element's node document and target be the element.
1. If target is already in doc's pending scrollend event targets, abort these steps.
1. Append target to doc's pending scrollend event targets.
1. For each item target in doc's pending scrollend event targets, in the order they were added to the list, run these substeps:
@@ -1728,7 +1730,7 @@ Otherwise, scrolling is done on an element and let doc be the element
scrollend
{{Event}}
{{Document}}, elements
- Fired at the {{Document}} or element when scroll is completed: the viewport or element has been scrolled, the scroll sequence has ended and any scroll offset changes have been applied.
+ Fired at the {{Document}} or element when scroll is completed: the viewport or element has been scrolled, the scroll sequence has ended and any scroll offset changes have been applied.
@@ -1748,7 +1750,7 @@ This section documents some of the changes between publications of this specific
generally not listed.
Changes From 22 June 2022
-* Adam Argyle moved the 'scrollend' event from WICG 'overscroll-scrollend-events' to [[CSSOM-VIEW-1]]
+* Adam Argyle moved the scrollend event from WICG overscroll-scrollend-events to [[CSSOM-VIEW-1]]
Changes From 19 October 2020
* Added the "Security and Privacy Considerations" section