I would like to import jQuery inside an IIFE scope as follows:
(function (window, document) {
"use strict";
}(window, document));
Now I run a severe mode violation as soon as this code runs, possibly because jQuery itself does not match:
In strict mode code, functions can only be declared at the top level or immediately within another function.
Is there a way to load jQuery only within the same scope, while maintaining strict mode for the rest of the code that relies on it?
source
share