The ScrollTimeline constructor text has the following:
Creates a new ScrollTimeline object using the following procedure:
-
Let timeline be a new ScrollTimeline object.
-
Let source be the result corresponding to the first matching condition from below.
If the source value of options is non-null,
Otherwise (source is null):
- Let source be the scrollingElement of the Document associated with the Window that is the current global object.
Note: source may still be null after this step, e.g. if the Document has no scrollingElement.
-
Set the source of timeline to source.
Which is odd because source is not nullable in the ScrollTimeline spec. So how can we assign source if it is null?
Also, "Let source be source" is odd. Clearly it means the source member of options but it needs to say that.