- From: Brian Birtles via GitHub <sysbot+gh@w3.org>
- Date: Tue, 16 Jun 2020 01:44:22 +0000
- To: public-css-archive@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.
But the spec explicitly says that the Document can have no scrollingElement and hence source can be null?
> However thinking about this more, I wonder if we should allow a three state in our handling:
>
> * Unspecified: Use document scroller e.g., `new ScrollTimeline({}); /*or*/ new ScrollTimeline()`
> * 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}) `
That would solve this issue (once we also define the behavior when source is null, e.g. in the "resolve a container-based offset" algorithm). I'm not sure if it's _useful_ to be able to do that, but maybe it's fine.
--
GitHub Notification of comment by birtles
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5202#issuecomment-644480218 using your GitHub account
Received on Tuesday, 16 June 2020 01:44:24 UTC