-
-
Notifications
You must be signed in to change notification settings - Fork 535
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
Replace node mutation by WeakMap #326
Comments
Sounds good to me. Let's give the static helper a short name since |
Yeah definitely. |
SimpleBar.ofElement(document.getElementById("pane")).getScrollElement().addEventListener("scroll", () => {
…
}) and wondering whether the extra word is actually worth the extra horizontal space, when there’s not really anything else that you could take the SimpleBar of. Your call though. |
As discussed there it would be better to use a
WeakMap
to keep track of SimpleBar instances instead of mutating the nodes elements.We also need to add a static helper to retrieve the SimpleBar instance (that will now sits at
SimpleBar.instances.get(el)
).cc @andersk
The text was updated successfully, but these errors were encountered: