Author: a.d.bergi
Description:
Continuing Bug Bug 31511#6
http://en.wikipedia.org/w/index.php?diff=454405866
http://en.wikipedia.org/w/index.php?diff=454588601&oldid=454587788
Two reports about a not well initialised toolbar. I think I found a reason:
The current implementation puts out a inline script tag with the RessourceLoader-call for certain modules, amongst them mw.action.edit. Right after that comes another inline script, which checks the existance of window.mediawiki and then addsButtons() to the toolbar. On-DOM-Ready then the mw.toolbar.inits().
One concern I have is that the second inline script shouldn't rely on the RL module, which might be loaded and executed asynchronously in newer browsers in special cases.
Also, it is very hard for scripts like the XEB-gadget to execute a function between the addButton-calls, which register the default buttons, and the init() function that creates the buttons.
So I'd propose to create a own ressource loader module for the default buttons. I can't see any reason why this is still an inline script; we might even put it together with the mw.toolbar code.
Version: 1.18.x
Severity: enhancement