-
Notifications
You must be signed in to change notification settings - Fork 131
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
Custom scroller #85
Custom scroller #85
Conversation
Generally speaking, concept is fine. General points: It would be good to get team consensus on how elements that need references to user-supplied peer or parent nodes should expose API's to get the node reference from the user. After talking to @cdata, it seems there are a few existing techniques used:
Judging by the current code, the
I would like to discuss this a bit before we lock in an API here. I'll make other comments inline. |
} | ||
|
||
if (oldScroller && oldScroller.addEventListener) { | ||
oldScroller.addEventListener('scroll', this._scrollListener); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be removeEventListener
?
@kevinpschaaf sounds goo :) I'd love to discuss this in detail with @cdata. BTW: here's the code for custom scroll target as a behavior: https://github.com/PolymerLabs/app-layout/blob/master/scroll-behaviors/custom-scroller-behavior.html |
Yeah, I also want to get some core team input on the general topic as well. |
@kevinpschaaf @blasten Regarding consensus on how to declare element siblings, cousins or ancestors for a given element... Right now we have a few other elements that need to do similar things, and all of them are different implementations:
There are probably other examples. All examples fundamentally expect the same thing: a property that maps to an element reference, and in all cases the element is not expected to be a member of the host's Shadow tree. The following are sources of variation in implementations:
It kind of seems to me that a primitive mechanism in Polymer core (perhaps something like special support for a property with At any rate, it would be really nice to be able to standardize this somehow. There seems to be a lot of overlap (granted not 100%) between implementations. |
@cdata good. I like the idea of the CustomScrollerBehaviorcurrently uses |
I'm closing this PR in favor of |
One of the requested feature:
Also, I'm using the document scroll in the new layout elements: https://github.com/PolymerLabs/app-layout.
A few use cases:
cc @frankiefu