Author: a.d.bergi
Description:
There are a few ways that resource loader is used after DOM ready, but before its handler for this event is invoked. There may be userscripts running in the users browser that can do that. What happens is:
- the userscript adds a DOMready-handler
- the scripts get loaded, jQuery adds its handler, mw.loader is initialisized
- the dom is finished
- the userscripts handler gets invoked and from there mw.loader is called
- as the loaders "ready" variable is still false, it uses document.write
- the document crashes very ugly
To prevent that, the userscript should be able to set the ready variable to true.
I propose to make the function, which is used as the callback argument to jQuery.ready(), a public property of the loader object.
Version: unspecified
Severity: enhancement