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

       Web browser: ---
             Bug #: 34861
           Summary: Javascript script loading order is wrong
           Product: MediaWiki
           Version: 1.19
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Javascript
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---


the problem: Gadgets are loaded before all core objects are initialized.

Reproduction: create a gadget that uses
"mw.user.name()"

result: javascript error "object does not have a method "name()" ".

core mw objects should all be fully initialized before any "user code" (i.e.,
site  common.js, user common.js and all gadgets) are run, otherwise it's
useless. 

if i need to test in the gadget code whether or not the "mw" object exists, or
whether it contains a field named "user", or whether this field has a method
"name()", then i can't use it.

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