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

Use of global JS scope #112

Open
markgibbons25 opened this issue Feb 22, 2021 · 2 comments
Open

Use of global JS scope #112

markgibbons25 opened this issue Feb 22, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@markgibbons25
Copy link

Would we be able to namespace the usage of SFE js so that it's not sitting in global scope?

@bartverdonck bartverdonck added the enhancement New feature or request label Feb 27, 2021
@bartverdonck
Copy link
Owner

Hi Mark,
You are reaching the boundaries of my skills with this one.
Can you make a suggestion or help me out?
Best Regards

@bartverdonck bartverdonck self-assigned this Feb 27, 2021
@bartverdonck bartverdonck added the question Further information is requested label Feb 27, 2021
@markgibbons25
Copy link
Author

Hi Bart,
Sure , a good reference on options is https://www.freecodecamp.org/news/javascript-modules-a-beginner-s-guide-783f7d7a5fcc/ - Perhaps the simplest way in this case would be to use the anonymous closure with jquery global import.

Example https://github.com/aspnet/jquery-ajax-unobtrusive/blob/master/src/jquery.unobtrusive-ajax.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants