-
Notifications
You must be signed in to change notification settings - Fork 47.7k
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
scrollLeft/scrollTop, why do they exist? #2140
Comments
(I've no idea.) |
Looking back at pre open source history this blames to when @yungsters created the property whitelist. I can't see a good reason it was added, perhaps there was some legacy reason which made sense at the time. I can't find any consumers on DOM components, only composite components so I think it should be fine to remove them. |
I've come across a potential use case for this, where I want to update the scroll position of an element and I want it to happen in conjunction with a bunch of other DOM writes. I can of course set it manually on the DOM after the render update, but it's much harder to keep unwanted reads from happening in between. It actually appears to work at a basic level, but easily gets out of sync with the actual scroll position if it's changed by the user. |
@lojjic There are other properties you can set on a DOM node that we don't expose. Proper setting of |
Closing in favor of PR #2202. |
scrollLeft
andscrollTop
are specified in HTMLDOMPropertyConfig, I understand what they're probably for. But what is the use-case? Doesn't it make more sense to just let users set/update them manually (on DOM nodes)?I'm asking because we currently emit invalid attributes for them, we also don't set the properties when reusing server-markup, so they seem really really hacky right now.
cc @zpao @spicyj @yungsters
The text was updated successfully, but these errors were encountered: