You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -368,8 +371,23 @@ not by wall-clock time, but by the progress of scrolling in a [=scroll container
368
371
369
372
370
373
: ScrollTimeline(options)
371
-
:: Creates a new {{ScrollTimeline}} object. The attributes of the {{ScrollTimeline}} are
372
-
initialized with the respective members of the {{options}} dictionary.
374
+
:: Creates a new {{ScrollTimeline}} object using the following procedure:
375
+
376
+
1. Let |timeline| be a new {{ScrollTimeline}} object.
377
+
378
+
1. Let |source| be the result corresponding to the first matching condition from below.
379
+
380
+
: If the |scrollSource| value of |options| is non-null,
381
+
:: Let |source| be |scrollSource|
382
+
383
+
: Otherwise (|scrollSource| is null):
384
+
:: Let |source| be the {{scrollingElement}} of the {{Document}}associated with the {{Window}} that is the current global object.
385
+
386
+
Note: |source| may still be null after this step, e.g. if the {{Document}} has no {{scrollingElement}}.
387
+
388
+
1. Set the {{ScrollTimeline/scrollSource}} of |timeline| to |source|.
389
+
390
+
1. Assign the {{ScrollTimeline/orientation}}, {{ScrollTimeline/startScrollOffset}}, {{ScrollTimeline/endScrollOffset}}, {{ScrollTimeline/timeRange}}, and {{ScrollTimeline/fill}} properties of |timeline| to the corresponding value from |options|.
373
391
374
392
375
393
@@ -379,14 +397,6 @@ not by wall-clock time, but by the progress of scrolling in a [=scroll container
379
397
:: The scrollable element whose scrolling triggers the activation and drives the
380
398
progress of the timeline.
381
399
382
-
If this is not specified, the {{scrollingElement}} of the [=active document=]
383
-
for the current [=browsing context=], as determined at the time the
384
-
{{ScrollTimeline}} is constructed, is used.
385
-
386
-
Note that the {{scrollSource}}'s {{ownerDocument}} may change over the lifetime
387
-
of the scroll timeline. This does not affect the scroll timeline; the timeline
388
-
continues to be driven by the scroll progress of the {{scrollSource}}.
389
-
390
400
: orientation
391
401
:: Determines the direction of scrolling which triggers the activation and drives
392
402
the progress of the trigger.
@@ -503,8 +513,8 @@ The effective time range of a {{ScrollTimeline}} is calculated as fol
503
513
The [=current time=] of a {{ScrollTimeline}} is calculated
504
514
as follows:
505
515
506
-
1. If {{scrollSource}} does not currently have a [=CSS layout box=], or if its layout box is not
507
-
a [=scroll container=], return an unresolved time value.
516
+
1. If {{scrollSource}}is null, does not currently have a [=CSS layout box=], or
517
+
if its layout box is not a [=scroll container=], return an unresolved time value.
508
518
509
519
2. Otherwise, let current scroll offset be the current scroll offset of {{scrollSource}}
0 commit comments