@@ -262,7 +262,7 @@ Snap Events {#snap-events}
262262████████ ███ ████████ ██ ██ ██ ██████
263263-->
264264
265- {{snapchanged }} and {{snapchanging }} {#snapchanged -and-snapchanging }
265+ {{scrollsnapchange }} and {{scrollsnapchanging }} {#scrollsnapchange -and-scrollsnapchanging }
266266--------------------------------------------
267267
268268 CSS scroll snap points are often used as a mechanism to
@@ -283,27 +283,27 @@ Snap Events {#snap-events}
283283 </thead>
284284 <tbody>
285285 <tr>
286- <th> <dfn for="snapchanged " event>snapchanged </dfn> </th>
286+ <th> <dfn for="scrollsnapchange " event>scrollsnapchange </dfn> </th>
287287 <td> {{SnapEvent}} </td>
288288 <td> scroll containers</td>
289289 <td> Fired at the scrolling element or {{Document}} at the end of a scroll (before a {{scrollend}} event)
290290 or after a <a href="https://drafts.csswg.org/css-scroll-snap-1/#re-snap">layout snap</a>
291291 if the element that the scrolling element or Document is snapped to changed.</td>
292292 </tr>
293293 <tr>
294- <th> <dfn for="snapchanging " event>snapchanging </dfn> </th>
294+ <th> <dfn for="scrollsnapchanging " event>scrollsnapchanging </dfn> </th>
295295 <td> {{SnapEvent}} </td>
296296 <td> scroll containers</td>
297297 <td> Fired at the scrolling element or {{Document}} during scrolling (before a {{scroll}} event),
298298 if the element that the scrolling would cause the scroller to snap to is
299- different from the target reported by the last snapchanging event that was fired.</td>
299+ different from the target reported by the last scrollsnapchanging event that was fired.</td>
300300 </tr>
301301 </tbody>
302302 </table>
303303
304- <h4 for="snapchanged " id="snapchanged "> snapchanged </h4>
305- {{snapchanged }} indicates that the snap area to which a snap container is snapped along either axis has changed.
306- {{snapchanged }} is dispatched:
304+ <h4 for="scrollsnapchange " id="scrollsnapchange "> scrollsnapchange </h4>
305+ {{scrollsnapchange }} indicates that the snap area to which a snap container is snapped along either axis has changed.
306+ {{scrollsnapchange }} is dispatched:
307307
308308 <ol>
309309 <li>
@@ -327,70 +327,70 @@ Snap Events {#snap-events}
327327 </ol>
328328
329329 Scrolling operations always lead to {{scrollend}} events being fired. If a
330- scrolling operation also results in a {{snapchanged }} event being fired, the
331- {{snapchanged }} event should be fired before the {{scrollend}} event.
330+ scrolling operation also results in a {{scrollsnapchange }} event being fired, the
331+ {{scrollsnapchange }} event should be fired before the {{scrollend}} event.
332332
333333 Each {{Document}} has an associated list of
334- <dfn export for=Document>pending snapchanged event targets</dfn> , initially empty.
334+ <dfn export for=Document>pending scrollsnapchange event targets</dfn> , initially empty.
335335
336336 Each
337337 <a spec=css-scroll-snap lt="scroll snap container">snap container</a> has
338- one <dfn export>snapchangedTargetBlock </dfn> and one
339- <dfn export>snapchangedTargetInline </dfn> in the block and inline axes
338+ one <dfn export>scrollsnapchangeTargetBlock </dfn> and one
339+ <dfn export>scrollsnapchangeTargetInline </dfn> in the block and inline axes
340340 respectively, each of which can either be null if the container is not
341341 snapped in that axis or the {{Element}} to which the container is snapped.
342342
343- When asked to <dfn export for=Document>update snapchanged targets</dfn>
343+ When asked to <dfn export for=Document>update scrollsnapchange targets</dfn>
344344 for a <a spec=css-scroll-snap lt="scroll snap container">snap container</a> ,
345345 |snapcontainer|, run these steps:
346346
347347 1. Let <var> doc</var> be |snapcontainer|'s associated {{Document}} .
348- 1. Let <var> blockTarget</var> be the <a>snapchangedTargetBlock </a> associated
348+ 1. Let <var> blockTarget</var> be the <a>scrollsnapchangeTargetBlock </a> associated
349349 with |snapcontainer|.
350- 1. Let <var> inlineTarget</var> be the <a>snapchangedTargetInline </a> associated
350+ 1. Let <var> inlineTarget</var> be the <a>scrollsnapchangeTargetInline </a> associated
351351 with |snapcontainer|.
352- 1. Let <var> blockSnapchangingTarget </var> be the <a>snapchangingTargetBlock </a>
352+ 1. Let <var> blockScrollSnapchangingTarget </var> be the <a>scrollsnapchangingTargetBlock </a>
353353 associated with |snapcontainer|.
354- 1. Let <var> inlineSnapchangingTarget </var> be the
355- <a>snapchangingTargetInline </a> associated with |snapcontainer|.
354+ 1. Let <var> inlineScrollSnapchangingTarget </var> be the
355+ <a>scrollsnapchangingTargetInline </a> associated with |snapcontainer|.
356356 1. Let <var> snap targets changed</var> be a boolean flag that is initially false.
357- 1. If <var> blockTarget</var> is not the same element as <var> blockSnapchangingTarget </var> or
358- 1. Set the <a>snapchangedTargetBlock </a> associated with |snapcontainer| to
359- <var> blockSnapchangingTarget </var> .
357+ 1. If <var> blockTarget</var> is not the same element as <var> blockScrollSnapchangingTarget </var> or
358+ 1. Set the <a>scrollsnapchangeTargetBlock </a> associated with |snapcontainer| to
359+ <var> blockScrollSnapchangingTarget </var> .
360360 1. Set <var> snap targets changed</var> to true.
361- 1. If <var> inlineTarget</var> is not the same element as <var> inlineSnapchangingTarget </var> :
362- 1. Set the <a>snapchangedTargetInline </a> associated with |snapcontainer| to
363- <var> inlineSnapchangingTarget </var> .
361+ 1. If <var> inlineTarget</var> is not the same element as <var> inlineScrollSnapchangingTarget </var> :
362+ 1. Set the <a>scrollsnapchangeTargetInline </a> associated with |snapcontainer| to
363+ <var> inlineScrollSnapchangingTarget </var> .
364364 1. Set <var> snap targets changed</var> to true.
365365 1. If <var> snap targets changed</var> is true:
366366 1. If |snapcontainer| is not already in <var> doc</var> 's
367- <a>pending snapchanged event targets</a> :
367+ <a>pending scrollsnapchange event targets</a> :
368368 1. Append |snapcontainer| to <var> doc</var> 's
369- <a>pending snapchanged event targets</a> .
369+ <a>pending scrollsnapchange event targets</a> .
370370
371371 Note: When snapping occurs on a scroller (either due to a layout change or a
372- scrolling operation) the <a>snapchangingTargetBlock </a> and <a>snapchangingTargetInline </a>
372+ scrolling operation) the <a>scrollsnapchangingTargetBlock </a> and <a>scrollsnapchangingTargetInline </a>
373373 associated with that scroller are updated and represent the current snap targets
374- of that scroller. This allows the <a>update snapchanged targets</a> algorithm
375- to use these elements to determine whether a {{snapchanged }} event should be fired.
374+ of that scroller. This allows the <a>update scrollsnapchange targets</a> algorithm
375+ to use these elements to determine whether a {{scrollsnapchange }} event should be fired.
376376
377- When asked to <dfn>dispatch pending snapchanged events</dfn> for a {{Document}} ,
377+ When asked to <dfn>dispatch pending scrollsnapchange events</dfn> for a {{Document}} ,
378378 <var> doc</var> , run these steps:
379- 1. For each item <var> target</var> in |doc|'s <a>pending snapchanged event targets</a> :
380- 1. Fire a {{SnapEvent}} , |snapevent|, named {{snapchanged }} at <var> target</var>
379+ 1. For each item <var> target</var> in |doc|'s <a>pending scrollsnapchange event targets</a> :
380+ 1. Fire a {{SnapEvent}} , |snapevent|, named {{scrollsnapchange }} at <var> target</var>
381381 and let |snapevent|'s {{SnapEvent/snapTargetBlock}} and
382- {{SnapEvent/snapTargetInline}} attributes be the <a>snapchangedTargetBlock </a> and the
383- <a>snapchangedTargetInline </a> , respectively, that are associated with <var> target</var> .
384- 1. Empty <var> doc</var> 's <a>pending snapchanged event targets</a> .
382+ {{SnapEvent/snapTargetInline}} attributes be the <a>scrollsnapchangeTargetBlock </a> and the
383+ <a>scrollsnapchangeTargetInline </a> , respectively, that are associated with <var> target</var> .
384+ 1. Empty <var> doc</var> 's <a>pending scrollsnapchange event targets</a> .
385385
386- <h4 id="snapchanging "> snapchanging </h4>
387- {{snapchanging }} is dispatched:
386+ <h4 id="scrollsnapchanging "> scrollsnapchanging </h4>
387+ {{scrollsnapchanging }} is dispatched:
388388 * during a scrolling operation, if the element to which a
389389 <a spec=css-scroll-snap lt="scroll snap container">snap container</a> would
390390 <a spec="css-scroll-snap-1" lt="scroll snap">snap</a> (in either axis) changes, or
391- * if a [[css-scroll-snap-1#re-snap|layout change]] occurs such that a {{snapchanged }} event
392- is to be dispatched. In this case, as with the scrolling case, the {{snapchanging }} event
393- should be dispatched before the {{snapchanged }} event.
391+ * if a [[css-scroll-snap-1#re-snap|layout change]] occurs such that a {{scrollsnapchange }} event
392+ is to be dispatched. In this case, as with the scrolling case, the {{scrollsnapchanging }} event
393+ should be dispatched before the {{scrollsnapchange }} event.
394394
395395 A scrolling operation might animate towards a particular position (e.g.
396396 scrollbar arrow clicks, arrow key presses, "behavior: smooth" programmatic
@@ -404,64 +404,64 @@ Snap Events {#snap-events}
404404 * In the latter case, the intended scroll position is the current scroll offset as
405405 determined by the user's input.
406406
407- {{snapchanging }} aims to let the web page know, as early as possible,
407+ {{scrollsnapchanging }} aims to let the web page know, as early as possible,
408408 that the scrolling operation will result in a change in the element the snap
409409 container is snapped to. The user agent should evaluate whether to trigger
410- {{snapchanging }} based on the <a>eventual snap target</a> to which the scroller would
410+ {{scrollsnapchanging }} based on the <a>eventual snap target</a> to which the scroller would
411411 <a spec="css-scroll-snap-1" lt="scroll snap">snap</a> were the scrolling operation
412412 to reach its intended scroll position.
413413
414- Note: Since snapchanging gives the web page hints about future snapping,
415- the snapping hinted at by a snapchanging event might not materialize since it
414+ Note: Since scrollsnapchanging gives the web page hints about future snapping,
415+ the snapping hinted at by a scrollsnapchanging event might not materialize since it
416416 will be possible for subsequent scrolling input to further alter the snap
417417 container's scroll position and result in a different eventual snap target.
418418
419419
420- {{snapchanging }} events are fired before {{scroll}} events.
420+ {{scrollsnapchanging }} events are fired before {{scroll}} events.
421421
422422 Each {{Document}} has an associated list of
423- <dfn export for=Document>pending snapchanging event targets</dfn> , initially empty.
423+ <dfn export for=Document>pending scrollsnapchanging event targets</dfn> , initially empty.
424424
425425 Each
426426 <a spec=css-scroll-snap lt="scroll snap container">snap container</a> has
427- one <dfn>snapchangingTargetBlock </dfn>
428- and one <dfn>snapchangingTargetInline </dfn> in the block and inline axes
427+ one <dfn>scrollsnapchangingTargetBlock </dfn>
428+ and one <dfn>scrollsnapchangingTargetInline </dfn> in the block and inline axes
429429 respectively, each of which can either be null if the container is not
430430 snapping in that axis or the {{Element}} to which the container is snapping.
431431
432- When asked to <dfn export for=Document>update snapchanging targets</dfn>
432+ When asked to <dfn export for=Document>update scrollsnapchanging targets</dfn>
433433 for a <a spec=css-scroll-snap lt="scroll snap container">snap container</a> ,
434434 |snapcontainer|, given an {{Element}} newBlockTarget and an {{Element}}
435435 newInlineTarget, run these steps:
436436
437437 1. Let <var> doc</var> be |snapcontainer|'s associated {{Document}} .
438- 1. Let <var> blockTarget</var> be the <a>snapchangingTargetBlock </a> that is
438+ 1. Let <var> blockTarget</var> be the <a>scrollsnapchangingTargetBlock </a> that is
439439 associated with |snapcontainer|.
440- 1. Let <var> inlineTarget</var> be the <a>snapchangingTargetInline </a> that is
440+ 1. Let <var> inlineTarget</var> be the <a>scrollsnapchangingTargetInline </a> that is
441441 associated with |snapcontainer|.
442442 1. If <var> newBlockTarget</var> is not the same element as <var> blockTarget</var> :
443- 1. Set the <a>snapchangingTargetBlock </a> associated with |snapcontainer| to
443+ 1. Set the <a>scrollsnapchangingTargetBlock </a> associated with |snapcontainer| to
444444 <var> newBlockTarget</var> .
445445 1. If |snapcontainer| is not already in <var> doc</var> 's
446- <a>pending snapchanging event targets</a> ,
446+ <a>pending scrollsnapchanging event targets</a> ,
447447 1. Append |snapcontainer| to <var> doc</var> 's
448- <a>pending snapchanging event targets</a>
448+ <a>pending scrollsnapchanging event targets</a>
449449 1. If <var> newInlineTarget</var> is not the same element as <var> inlineTarget</var> :
450- 1. Set the <a>snapchangingTargetInline </a> associated with |snapcontainer| to
450+ 1. Set the <a>scrollsnapchangingTargetInline </a> associated with |snapcontainer| to
451451 <var> newInlineTarget</var> .
452452 1. If |snapcontainer| is not already in <var> doc</var> 's
453- <a>pending snapchanging event targets</a> ,
453+ <a>pending scrollsnapchanging event targets</a> ,
454454 1. Append |snapcontainer| to <var> doc</var> 's
455- <a>pending snapchanging event targets</a> .
455+ <a>pending scrollsnapchanging event targets</a> .
456456
457- When asked to <dfn>dispatch pending snapchanging events</dfn> for a {{Document}} ,
457+ When asked to <dfn>dispatch pending scrollsnapchanging events</dfn> for a {{Document}} ,
458458 <var> doc</var> , run these steps:
459- 1. For each item <var> target</var> in |doc|'s <a>pending snapchanging event targets</a> :
460- 1. Fire a {{SnapEvent}} , |snapevent|, named {{snapchanging }} at <var> target</var>
459+ 1. For each item <var> target</var> in |doc|'s <a>pending scrollsnapchanging event targets</a> :
460+ 1. Fire a {{SnapEvent}} , |snapevent|, named {{scrollsnapchanging }} at <var> target</var>
461461 and let |snapevent|'s {{SnapEvent/snapTargetBlock}} and
462- {{SnapEvent/snapTargetInline}} attributes be the <a>snapchangingTargetBlock </a> and the
463- <a>snapchangingTargetInline </a> , respectively, that are associated with <var> target</var> .
464- 1. Empty <var> doc</var> 's <a>pending snapchanging event targets</a> .
462+ {{SnapEvent/snapTargetInline}} attributes be the <a>scrollsnapchangingTargetBlock </a> and the
463+ <a>scrollsnapchangingTargetInline </a> , respectively, that are associated with <var> target</var> .
464+ 1. Empty <var> doc</var> 's <a>pending scrollsnapchanging event targets</a> .
465465
466466 <h4 id="snap-events-on-layout-changes">Snap Events due to Layout Changes </h4>
467467 When a <a spec=css-scroll-snap lt="scroll snap container">snap container</a> ,
@@ -473,9 +473,9 @@ Snap Events {#snap-events}
473473 1. Let <var> newInlineTarget</var> be the element that |snapcontainer| has
474474 <a spec="css-scroll-snap-1" lt="scroll snap">snapped</a> to
475475 in the inline axis or null if it did not snap to any element.
476- 1. Run the steps to <a>update snapchanging targets</a> with <var> newBlockTarget</var>
476+ 1. Run the steps to <a>update scrollsnapchanging targets</a> with <var> newBlockTarget</var>
477477 as newBlockTarget and <var> newInlineTarget</var> as newInlineTarget.
478- 1. Run the steps to <a>update snapchanged targets</a> for |snapcontainer|.
478+ 1. Run the steps to <a>update scrollsnapchange targets</a> for |snapcontainer|.
479479
480480
481481SnapEvent interface
@@ -511,8 +511,8 @@ SnapEvent interface
511511 for the associated snap event.
512512 </div>
513513
514- For {{snapchanged }} events, the snap position is the position already
515- realized by the snap container after a scroll snap. For {{snapchanging }}
514+ For {{scrollsnapchange }} events, the snap position is the position already
515+ realized by the snap container after a scroll snap. For {{scrollsnapchanging }}
516516 events it is the snap position that the snap container will eventually
517517 snap to when the scrolling operation ends.
518518
0 commit comments