I submitted my addon to the AMO direcotry and the editor came back with this:
There are still a number of variables being leaked to the global scope,
probably because you're using them undeclared like...
He did not mention all the problem variables, is there anyway to know which are in global scope / getting leaked?
I have a crapload of variables and it would take ages going through each one of them to make sure they were declared properly with a “var”.
Please help!
Thanks!
If you’re trying to track down variables that may have been implicitly declared as global because of the omission of
var, you could run the code instrict mode. This will give you aReferenceErrorif you try to use variables that haven’t been property declared.You’ll need to run it in a supported browser, like Firefox 4 or higher. The
"use strict";declarative will ensure that any code inside the function will be evaluated using the rules of strict mode.