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
In this case we are not creating a MutationObserver for each element but we don't have the currentTarget so we should use finds or something inside the callback
The text was updated successfully, but these errors were encountered:
franpb14
changed the title
Adding a new helper to create a wrapper for MutationObserver
Adding a new helper to create a wrapper for MutationObserverMar 6, 2024
@franpb14 I have very little experience with MutationObserver API, so at this point it's hard for me to decide between both proposals or even if that's enough of common complexity to justify a new helper.
Let's imagine we have a list of menus that we want to observe and do something if that menu is opened, right now we should something like this:
so my suggestion is to create a wrapper
the helper would be something like:
so we can just write
other option for the helper could be:
In this case we are not creating a MutationObserver for each element but we don't have the currentTarget so we should use finds or something inside the callback
The text was updated successfully, but these errors were encountered: