metafizzy / metafizzy/flickity

Undocumented scroll event argument positionX

Open
#943 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.6k
Forks
593
PR merge metrics
No merged PRs in 30d

Description

I stumbled onto the second argument passed to the scroll event, `positionX`, and am wondering if it's reliable to use it. It's not in the documentation, but it looks like it's been there since v2.0.0.
Can I use this in production and not worry about it being removed in the future?

Here's the line where the scroll event gets returned with 2 arguments: `progress, positionX` https://github.com/metafizzy/flickity/blob/e2706840532c0ce9c4fc25832e810ad4f9823b61/js/animate.js#L94

Thanks!

Contributor guide

Open the contributing guide

Research direction

Start with the scroll event return in js/animate.js at line 94 and inspect the surrounding event implementation. Determine whether positionX is a supported public argument, then document its status and stability in the relevant API documentation; done means users can tell whether it is safe to rely on.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation, frontend
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.