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

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

From: Majid Valipour via GitHub <sysbot+gh@w3.org>
Date: Sun, 14 Jun 2020 14:36:06 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-643775214-1592145365-sysbot+gh@w3.org>
I guess the idea is that if the `ScrollTimelineOptions` may have a null source (which is the default value). And if that is given as input we resolve it to root scroller. So constructed timeline will never have a null source.

However thinking about this more, I wonder we should allow a three state in our handling
- Unspecified: Use default value as document scroller e.g., `new ScrollTimeline({source: null})`  
- Explicitly set to null:  set source to to null  e.g., `new ScrollTimeline({source: null}) `
- Explicitly set to element:  set source to element  e.g., `new ScrollTimeline({source: $div}) `

This is similar to how timeline is handler on `Animation` constructor.
I can make this change and clear up the wording mistake as well.

GitHub Notification of comment by majido
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5202#issuecomment-643775214 using your GitHub account
Received on Sunday, 14 June 2020 14:36:07 UTC

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