Skip to content

[scroll-animations-1] Use pseudo-element as the source of ScrollTimeline or subject of ViewTimeline #13471

@BorisChiou

Description

@BorisChiou

Per the spec [scroll-animations-1] definition, ScrollTimeline interface has an attribute, source, which is the scroll container of this ScrollTimeline:

[Exposed=Window]
interface ScrollTimeline : AnimationTimeline {
  constructor(optional ScrollTimelineOptions options = {});
  readonly attribute Element? source;
  readonly attribute ScrollAxis axis;
};

However, what happened if the scroll container is a pseudo-element? Should we add a CSSOMString to represent the pseudo-element, just like KeyframeEffect? Or restrict it to non pseudo-element?

Same question for attribute subject in ViewTimeline. We only have an Element attribute, and I think it is possible to let a pseudo-element be a subject, right? Or do we have to restrict it for only non pseudo-element?

[Exposed=Window]
interface ViewTimeline : ScrollTimeline {
  constructor(optional ViewTimelineOptions options = {});
  readonly attribute Element subject;
  ...
};

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions