* Krinkle <krinklemail(a)gmail.com> [Mon, 19 Mar 2012 14:32:51 +0100]:
Converted all of for..in into $.each(). The most funny thing is that
$.each() did not work correctly with sparse arrays [], walking with
"undefs" between real elements. While for..in used to work fine
(FF,Chrome,IE8,IE9). So I had to convert sparse arrays into sparse
objects {}, just as you recommended. This way $.each() works, however it
also creates new context (different "this") so I've had to use var
myself = this more often than it used to be.
The most pailful part was to pass control to the main module after edit
module was abruptly terminated (without any warnings in Chrome console).
I managed to call the main module method directly from edit module. Not
a very nice thing, but at least it works. Who would know that such
potentially easy thing as refactoring one js class into two
ResourceLoader modules can be that much painful. I used to dynamically
load jQuery for custom MediaWiki 1.15 installation via LABjs and don't
remember such problems back then.
Dmitriy