W3C home > Mailing lists > Public > public-css-archive@w3.org > June 2020

[csswg-drafts] [scroll-animations-1] Something is odd with the handling of `source` in the ScrollTimeline constructor (#5202)

From: Brian Birtles via GitHub <sysbot+gh@w3.org>
Date: Fri, 12 Jun 2020 07:32:40 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-637548565-1591947159-sysbot+gh@w3.org>
birtles has just created a new issue for https://github.com/w3c/csswg-drafts:

== [scroll-animations-1] Something is odd with the handling of `source` in the ScrollTimeline constructor ==
The [`ScrollTimeline` constructor](https://drafts.csswg.org/scroll-animations-1/#dom-scrolltimeline-scrolltimeline) text has the following:

> Creates a new ScrollTimeline object using the following procedure:
> 1. Let timeline be a new ScrollTimeline object.
> 1. Let source be the result corresponding to the first matching condition from below.
>     **If the source value of options is non-null,**
>     * Let source be source
> 
>     **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.
> 1. 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 not null?

Also, "Let source be source" is odd. Clearly it means the `source` member of `options` but it needs to say that.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5202 using your GitHub account
Received on Friday, 12 June 2020 07:32:42 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:09 UTC