Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polyfill doesn't define ScrollTimeline at all. #160

Open
MrFoxPro opened this issue Sep 22, 2023 · 4 comments · May be fixed by #217
Open

Polyfill doesn't define ScrollTimeline at all. #160

MrFoxPro opened this issue Sep 22, 2023 · 4 comments · May be fixed by #217

Comments

@MrFoxPro
Copy link

Trying to use
import 'https://flackr.github.io/scroll-timeline/dist/scroll-timeline.js';
Results in no ScrollTimeline defined.
This is also a case on demo site:
image

@MrFoxPro
Copy link
Author

At the same time, https://argyleink.github.io/scroll-timeline/dist/scroll-timeline.js works, but it doesn't follow specs.

@bramus
Copy link
Collaborator

bramus commented Jan 28, 2024

I see that you are using Firefox Nightly, which is the culprit here.

Firefox has a partial implementation of Scroll-Driven Animations, which is enabled in Nightly. Because Nightly claims support for SDA – even though it’s not entirely implemented – the polyfill bails out.

Looking at what Firefox Nightly does and the polyfill:

  • Firefox has (partial) CSS Support
  • Firefox has no JS Support (ViewTimeline and ScrollTimeline are undefined)
  • The polyfill doesn’t load when it detects CSS Support.

The polyfill’s feature detection needs to be adjusted so that it can plug the JS and CSS functionality individually.

To be transparent though: I don’t think a vendor would ship either only the CSS or only the JS approach. If this change turns out to be Very Complicated™, then I don’t think it’s worth pursuing this adjustment because it doesn’t affect Firefox Stable users.

In Firefox Stable the partial implementation isn’t active, so users don’t run into this weird situation. If you use Nightly on a daily basis you can set layout.css.scroll-driven-animations.enabled to false via about:config so that the polyfill loads as it normally does.

@bramus bramus linked a pull request Jan 28, 2024 that will close this issue
@steve-tranont
Copy link

I have the same problem in Chrome.

@bramus
Copy link
Collaborator

bramus commented Feb 12, 2024

I have the same problem in Chrome.

Which version are you using? Scroll-Driven Animations shipped in Chrome 115.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants