Skip to content
This repository has been archived by the owner on Aug 10, 2024. It is now read-only.

Support mutation observers #84

Open
bartbutenaers opened this issue Dec 25, 2020 · 0 comments
Open

Support mutation observers #84

bartbutenaers opened this issue Dec 25, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@bartbutenaers
Copy link
Owner

It might be useful to do something when an attribute value changes.
However seems this is only possible by watching the entire DOM tree for changes, using a mutation observer.
And since we would have to watch for DOM changes anyway, we could also use this to detect whether elements are added or removed.

Perhaps this could be implemented like this:

  1. A user can specify (in the "Events" and "JS" tabsheets) for which CSS selector the mutation event needs to be detected:

    image

  2. As soon as minimum 1 of such events is used, the client side will add a mutation observer.

  3. When the mutation observer callback is triggered, when can determine whether the target element matches the CSS selector (e.v. via this mechanism on Stackoverflow)

  4. When a match has been found, the specified event handler will be executed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant