You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a situation where I have many components and some external libraries which manipulates the DOM. So, those libraries transform the root node of my components, and I need to run functions from the components after they are manipulated but I can't figure out how to get reference to that instance from the node manipulated for this library.
In other words, what I would like is the inverse of the element property of nanocomponent, perhaps a function that given a DOM element returns the actual nanocomponent tied to it. Is this possible?
Thanks :)
The text was updated successfully, but these errors were encountered:
perhaps a function that given a DOM element returns the actual nanocomponent tied to it
Not at the moment, no. Appending properties to prototypes on the fly greatly reduces performance, so maybe that's not the solution. Perhaps you could share a cache instance around, and read the key from the DOM element to find the right instance?
DOM Nodes created by nanocomponent shouldn't be externally modified (given the way thing work now). If you must, pass the data changes into the component through render or add additional class methods and handle the internal mutation at the component level.
If you see something nanocomponent can do internally to be more accommodating I'm open to ideas.
Hi 👋
I have a situation where I have many components and some external libraries which manipulates the DOM. So, those libraries transform the root node of my components, and I need to run functions from the components after they are manipulated but I can't figure out how to get reference to that instance from the node manipulated for this library.
In other words, what I would like is the inverse of the
element
property of nanocomponent, perhaps a function that given a DOM element returns the actual nanocomponent tied to it. Is this possible?Thanks :)
The text was updated successfully, but these errors were encountered: