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
Added the ability to pass an element as the handle #56
Conversation
Added the ability to pass an element as the handle. This enables Polymer ShadowDom elements to be used as the handle as well.
Thank you for this contribution! This could be a useful feature. But I'd prefer to hear other's input before it gets merged. If you would like to see this feature please +1 |
Do I get to 👍 my own? Haha! Just to clarify, this will not break any existing selectors. All it does is extend the |
One thing to note, Draggabilly already does this on the element that's being passed in:
|
Is there any update on this? Thanks @desandro. |
+1 |
@davitv I recommend using a unique handle class if that's the case. I'm closing this PR as this feature didn't get enough support. |
It's your project, I'm just very confused why a simple, non-conflicting code change, that in some cases prevents double querySelector/elementByID lookups, would be rejected. |
I'd also like this change, and it wouldn't hurt anything else, would it? I always try to avoid having to run my own fork when I can, and this change is much preferable to having extra code in my project to deal with this. |
+1 |
3 similar comments
+1 |
+1 |
+1 |
No @desandro, i don't want to create an unique class for every tree node, and why should i, if it is better to pass a handle as a dom element, which is already selected before for other purposes. |
Any news on this? |
In the latest version, since my pull request was rejected, I've had to overwrite the
Not ideal at all, but it's the simplest way to fix the issue that prevents Draggabilly from supporting native ShadowDOM. |
Added the ability to pass an element as the handle. This enables Polymer ShadowDom elements to be used as the handle as well. Or just passing an element directly if you don't want it to use querySelectorAll();