Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

How about the window scroll events? #11

Open
Pickachu opened this issue Apr 15, 2015 · 0 comments
Open

How about the window scroll events? #11

Pickachu opened this issue Apr 15, 2015 · 0 comments

Comments

@Pickachu
Copy link

Maybe it's intended by design. But how about using it to monitor window events?

Something like:

<core-scroll-threshold lowerTrigger="0"></core-scroll-threshold>
var element = document.querySelector('core-scroll-threshold');
element.scrollTarget = window;
element.lowerTriggered = function () {alert('yay! ');};

It seems to fail because window does not have scrollHeight, but scrollY property.
And here it uses only scrollHeight: https://github.com/Polymer/core-scroll-threshold/blob/master/core-scroll-threshold.html#L165.

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

No branches or pull requests

1 participant