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

Refactor the JavaScript: IIFE's and event listeners #36

Open
pjc09h opened this issue Dec 20, 2022 · 0 comments
Open

Refactor the JavaScript: IIFE's and event listeners #36

pjc09h opened this issue Dec 20, 2022 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@pjc09h
Copy link
Contributor

pjc09h commented Dec 20, 2022

Currently, a lot of the site JavaScript uses raw functions dumped into a file. This causes problems with Google Closure Compiler, which in its advanced optimization mode, aggressively rewrites function names. This prevents me from using anything more than simple optimizations. The solution is to encapsulate all JavaScript in self-executing arrow functions (() => { /* ... */ })(); whose contents look for certain events such as clicking a widget and such.

@pjc09h pjc09h added bug Something isn't working enhancement New feature or request labels Dec 20, 2022
@pjc09h pjc09h self-assigned this Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant