User "Krinkle" posted a comment on MediaWiki.r82900.
Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/82900#c20634
Commit summary:
Fixes bug when having multiple textareas, which is caused by the fact that
dialogs are kept in memory for performance, even when selecting a different
textarea.
Comment:
Please use <code>.length</code> instead of <code>.size()</code>. Less function
call overhead, same number of characters. A strict comparison to 0 is preferred
(general good practice, also a bit faster).
The remove() call followed by .size() on the next line is a bit confusing, take
the following:
<pre>
$("<div>").remove().length
// Returns 1
</pre>
I assume you'd wanna re-select the ID from the dom ?
_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview