Sitecore-Forms-Extensions
Sitecore-Forms-Extensions copied to clipboard
Use of global JS scope
https://github.com/bartverdonck/Sitecore-Forms-Extensions/blob/8b0371ba2eb355575ff681305738626105ac8a0f/src/Feature/FormsExtensions/code/sitecore%20modules/Web/ExperienceForms/scripts/formsextensions.validate.js#L6
Would we be able to namespace the usage of SFE js so that it's not sitting in global scope?
Hi Mark, You are reaching the boundaries of my skills with this one. Can you make a suggestion or help me out? Best Regards
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