https://bugzilla.wikimedia.org/show_bug.cgi?id=31895
Web browser: ---
Bug #: 31895
Summary: make mw.loaders "ready" variable public
Product: MediaWiki
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Keywords: easy
Severity: normal
Priority: Unprioritized
Component: Resource Loader
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
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.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l