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

[QUESTION]: event listeners attached to document or parent(s) #803

Closed
fr0z3nfyr opened this issue Jun 21, 2019 · 3 comments
Closed

[QUESTION]: event listeners attached to document or parent(s) #803

fr0z3nfyr opened this issue Jun 21, 2019 · 3 comments

Comments

@fr0z3nfyr
Copy link

Hi -

I apologize if this is not the right place to ask questions.

I'm implementing a custom filtering capabilities (advanced search) to my data grids (for the curious ones, I'm using DataTables). I'm loving jQuery-QueryBuilder so far and gradually learning to control it to my liking using its extensive API (although, I find the API docs a little too confusing or inadequate at some places).

That's about the background. I was just wondering whether initializing and destroying the QueryBuilder several times can likely pollute the DOM by attaching event listeners to any of the elements higher on the DOM tree or the document itself. I'm worried because, I use a bootstrap modal to initialize the queryBuilder on show and destroy on hide. So, this can happen a couple of times on the same page (because it is used for filtering like I said above).

A quick glance at the DOM tree suggested (I may be wrong) that the plugin operates within it's own limited DOM scope and is unlikely to cause problems, but I just wanted to be sure.

Also, is there a documented list of events/properties/attributes that are manipulated/attached during the lifespan (from init till destroy) of QueryBuilder?

Cheers!

@mistic100
Copy link
Owner

QB does not leave anything in the DOM but has some small memory leaks I didn't adressed : #745

No the internals are not documented, check the code.

@fr0z3nfyr
Copy link
Author

Cool! Do you have plans to look into fixing this memory leak in near future? I see that the attempts that were made don't actually help much

@mistic100
Copy link
Owner

You can see the developpement is paused for now, I'll keep track of the issue with #745

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants