[Wikiwyg-dev] BUG: JavaScript strict warnings



Reference http://www.javascriptkit.com/javatutors/serror.shtml.  It may be a little out of date, but the ideas are sound.

These days, the reason to fix strict warnings is not so much performance, but to fix subtle bugs which the browser
is warning you about.

Incidentally, if you see the words "anonymous function", that usually means you declared the function as:

foo = function() {
}

Mozilla prefers:

foo = function foo() {
}

JavaScript strict warning: http://demo.wikiwyg.net/wikiwyg/lib/Wikiwyg.js, line 92: anonymous function does not always return a value
JavaScript strict warning: http://demo.wikiwyg.net/wikiwyg/lib/Wikiwyg.js, line 51: assignment to undeclared variable Subclass
JavaScript strict warning: http://demo.wikiwyg.net/wikiwyg/lib/Wikiwyg.js, line 100: assignment to undeclared variable proto
JavaScript strict warning: http://demo.wikiwyg.net/wikiwyg/lib/Wikiwyg.js, line 357: assignment to undeclared variable die
JavaScript strict warning: http://demo.wikiwyg.net/wikiwyg/lib/Wikiwyg/Wysiwyg.js, line 127: variable styles hides argument
JavaScript strict warning: http://demo.wikiwyg.net/wikiwyg/lib/Wikiwyg/Wysiwyg.js, line 238: anonymous function does not always return a value
JavaScript strict warning: http://demo.wikiwyg.net/wikiwyg/lib/Wikiwyg/Wysiwyg.js, line 245: anonymous function does not always return a value
JavaScript strict warning: http://demo.wikiwyg.net/wikiwyg/lib/Wikiwyg/Wysiwyg.js, line 257: anonymous function does not always return a value
JavaScript strict warning: http://demo.wikiwyg.net/wikiwyg/lib/Wikiwyg/Wikitext.js, line 326: anonymous function does not always return a value
JavaScript strict warning: http://demo.wikiwyg.net/wikiwyg/lib/Wikiwyg/Wikitext.js, line 383: test for equality (==) mistyped as assignment (=)?
JavaScript strict warning: http://demo.wikiwyg.net/wikiwyg/lib/Wikiwyg/Wikitext.js, line 426: test for equality (==) mistyped as assignment (=)?
JavaScript strict warning: http://demo.wikiwyg.net/wikiwyg/lib/Wikiwyg/Wikitext.js, line 28: assignment to undeclared variable klass
JavaScript strict warning: http://demo.wikiwyg.net/wikiwyg/demo/standalone/, line 13: assignment to undeclared variable onload
JavaScript strict warning: http://demo.wikiwyg.net/wikiwyg/lib/Wikiwyg.js, line 157: reference to undefined property config[mode_object.classtype]
JavaScript strict warning: http://demo.wikiwyg.net/wikiwyg/lib/Wikiwyg/Wikitext.js, line 701: assignment to undeclared variable node
JavaScript strict warning: http://demo.wikiwyg.net/wikiwyg/lib/Wikiwyg/Wikitext.js, line 935: reference to undefined property attributes[i]

These are just first-glance warnings.  There may be more.







This archive was generated by a fusion of Pipermail (Mailman edition) and MHonArc.