Skip to content
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

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant