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

--- Comment #5 from Rainer Rillke @commons.wikimedia <[email protected]> 
---
Created attachment 12331
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=12331&action=edit
HTML DOM of Special:UploadWizard in debug mode

If you set the config *after* calling mw.loader.load for ext.uploadWizard, this
might happen:
* Browser sees "mw.loader.load"
* RL creates script tags and inserts them directly after the script node
containing the call (creating new script nodes which are above the config)
* Browser loads all these scripts (requested by RL) synchronously and "sees"
the UpWiz config after all scripts have been loaded. Most browsers do this
async for scripts inside <body> now, but Opera might behave differently.

As soon as mw.config is available, the UpWiz config can be set.

UpWiz config is shipped directly within the HTML (no separate script). Since
mw.config is available as soon as the head-scripts are loaded (which always
happens synchronously [except when using a special attribute]) and UpWiz config
contains only constants, you can put it directly at the beginning of the body
or better, as the last node into the head.

I will upload another image showing the HTML DOM of a browser having JS
disabled. You will see that, indeed Opera wrote all script requests directly
below the call to mw.loader which is highlighted here.

-- 
You are receiving this mail because:
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