https://bugzilla.wikimedia.org/show_bug.cgi?id=34538

--- Comment #6 from Krinkle <[email protected]> 2012-02-23 23:53:34 UTC ---
(In reply to comment #5)
> Calling it a todo would imply that the modules aren't broken, but they are.

Yeah, 'todo' was definitely a bad word choice. By all means, they are valid
breakages. But it's also true that code manipulating a dom element from a
script that isn't hardcoded inline, should really be in a document-ready
wrapper. And fortunately most code is doing that right. Either because they
were ported from before ResourceLoader (at which point all was loaded from the
<head> and without document-ready hook it wouldn't work at all), or because it
was written in the past year and done "right" right away.

It's also unfair to blame the extensions, since it was reliable to assume that
modules not loaded on 'top' would be loaded from the 'bottom'[1], and as such
execute after the document is ready.

The module queue was, however, split up to allow certain modules to load before
the page is rendered, not the other way around (eg. to make sure code is
executed after the page is rendered), but regardless it has happened (also in
modules written by experienced developers like Roan, Trevor and myself).

But it's also fairly safe to assume that nothing is going to be implemented in
core to mitigate it. It doesn't make sense to delay a module's executing by
force. A dom-ready wrapper is a trivial fix.

Speaking of which, are there any instances of this problem left that we know
of?

-- 
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

Reply via email to