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

Why rely on Jquery? #511

Closed
LTLA opened this issue Apr 17, 2024 · 3 comments
Closed

Why rely on Jquery? #511

LTLA opened this issue Apr 17, 2024 · 3 comments

Comments

@LTLA
Copy link

LTLA commented Apr 17, 2024

(Part of openjournals/joss-reviews#6617)

It seems like some of the C++ calls are converted into Javascript code that uses Jquery (see the various $(...) calls in include/emp/web). Is this really necessary? It adds a Jquery dependency to all downstream web applications that might not otherwise use it. From what I see, many of the Jquery calls in this library involve manipulating with DOM elements, so why not just use vanilla javascript (e.g., document.getElementById)?

In any case, if you really do need Jquery, this should be explicitly documented somewhere. I didn't see it discussed in any obvious place in the documentation.

@mercere99
Copy link
Member

You are correct -- Jquery seemed like it was going to be a big help when we first started using it in Empirical, but none of the functionality it provides is critical anymore, especially since we are working with auto-generated JavaScript code. We have planned to remove it for a while now and need to escalate the priority of that improvement to reduce the dependencies.

@mmore500
Copy link
Member

Opened PR #512 for this.

@mmore500
Copy link
Member

Fixed in #512 !

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

No branches or pull requests

3 participants