I am curious if it is indeed the case that well written Javascript IIFEs are impossible to bypass; For example:
(function() {
var foo = 9;
var exports = {
getFoo: function() {
return foo;
}
};
window.my_exports = exports;
})();
// can I do anything at all at this point to mutate/access foo directly?
Is there no clever ways to mutate foo anymore? Is it just a "memory leak" with a single strong reference from the closure getFoo which is exposed to global scope, so it cannot be reclaimed?
assuming no memory editors are used that is.