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
:: 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}}<a lt="document associated with a window">associated</a> with the {{Window}} that is the <a>current global object</a>.
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
</div>
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}}.
0 commit comments