-
Notifications
You must be signed in to change notification settings - Fork 401
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
Refactor renderer.getClassList()
into renderer.addClass()
, renderer.removeClass()
#2762
Comments
renderer.getClassList()
into renderer.addClass()
, renderer.removeClass()
This issue has been linked to a new work item: W-11568519 |
Rather than exposing the entire
... the renderer should have hooks to add or remove classes. |
I'm not sure this is entirely possible, because of this code: lwc/packages/@lwc/engine-core/src/framework/base-lightning-element.ts Lines 449 to 466 in 2ddff92
We need to expose |
Sure, but that doesn't mean we use that value to interact with, we just pass it along... then we can have new APIs just for the diffing. Basically, we have two separate buckets, APIs used for rendering, and APIs used for the element instance. |
@caridy What is the benefit in that case? We would have the following APIs on the renderer:
(This is based on the APIs we actually use in the engine.) If we expose |
Function
setScopeTokenClassIfNecessary
callsgetClassList(elm)
on an element, and assumes the shape of the result value to be a DOM Object and calls.add()
on it. Probably we should have a renderer api for just the add operation itself in one go.The text was updated successfully, but these errors were encountered: