Thread:Talk:MediaWiki vendors/WikiEditor toolbars, JavaScript dependencies, and asychronous behavior

Our biggest difficulty with MediaWiki, particularly in MediaWiki 1.20, is extending the WikiEditor using JavaScript. We have added several menus alongside Special Characters and Help, each with its own icons and dropdowns. They worked fine in MediaWiki 1.17. When 1.18 came, our custom icons started vanishing at random times. Now in 1.20, the icon problems are more frequent and the entire toolbar sometimes vanishes. It's possible that this is a coding error on our part, but we seem to be following the docs. Sometimes clearing the browser file cache helps, sometimes not.

Overall, we are suffering from timing problems with JavaScript modules that have dependencies. The dependencies are specified in ResourceLoader, but somehow, once the JS gets to the browser, the modules seem to interleave as they run. For example, if module A depends on B, we can specify that, but this doesn't seem to guarantee that every line of module B will have run before every line of module A. I'll ask my lead developer to follow up to this comment with more details.