I'm using jquery within a firefox addon, but i keep getting tons of warning messages like below:
anonymous function does not always return a value
System JS : WARNING resource://gre/modules/XPIProvider.jsm -> jar:file:///c:/use
rs/usernameremoved/appdata/local/temp/tmprpnucw.mozrunner/extensions/jid1-I3FWz29roUS
[email protected]!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.
js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://jid1-i
3fwz29rous8ua-at-jetpack/addon-name-removed/data/jquery.js:2435
Can you please let me know how can i ignore these errors? I can't find my console logs or errors because of them...
Jquery is included like this:
contentScriptFile: [self.data.url("jquery.js"),
self.data.url("zde.js"),
self.data.url("zdf.js")],
contentStyleFile: self.data.url("zd.css"),
Thanks!
These warnings are a result of the javascript.options.strict
(can be turned off and on again in about:config). Unfortunately, as far as I know, these warnings cannot be turned off on a file-by-file (or URI-by-URI) basis.
It appears that the SDK turns on this preference by default (in a normal browser it is turned off by default). There doesn't seem to be a way to change that via command line switches, so you'd have to locally patch the linked file in your copy of the SDK.
Those are valid warnings, but as you noted, pretty useless when it comes to third-party library code that you cannot fix anyway.