User "Aaron Schulz" changed the status of MediaWiki.r83605. Old Status: new New Status: ok
Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/83605#c0 Commit summary: JavaScript clean-up (Code conventions, 1.17 migration, cross-browser fixes and JSHint validation) : Vector SimpleSearch * Using the mw-alias global * Optimizing selector (Sizzle starts at the right, about 3x faster now ) *--> see also http://jsperf.com/jquery-selector-perf-select-right-to-left ) * Using mw.config instead of legacy globals * Before checking "foo in bar" making sure it's an array as it'll throw an exception * typeof is not reliable for functions cross-browser, using $.isFunction * $.fn.is() is fairly slow as it parses the string and then calls filter which will then do it's thing and eventually call hasClass(). Calling it directly now * Except for elements that can't have children (<input>) or can't be close (<img />), the html string should be valid and have a closing tag.("<input />"-> "<input>", "<div />" -> "<div></div>"). See also http://api.jquery.com/jQuery/ * Using jQuery 1.4's new ability to set element properties in the initial function call by passing an object as second argument instead of chain().of().calls() afterwards (see docs for what properties can and can't be set this way) * Using strict === comparison to compare to zero (faster and safer) _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
