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

       Web browser: ---
            Bug ID: 52718
           Summary: addModules should load CSS when JavaScript is disabled
           Product: MediaWiki
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: ResourceLoader
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
    Classification: Unclassified
   Mobile Platform: ---

The discussion on https://gerrit.wikimedia.org/r/74662 has ballooned because of
this bug.

addModules(), when called on a module that has no JavaScript, is something I'd
expect to work everywhere. But, when JS is disabled, evidently the CSS doesn't
get loaded, because addModules() loads everything, even CSS, via JavaScript.

It might take some creativity, but is there a way we can load JS and CSS via a
More Normal Method that would not necessarily require JavaScript? Maybe, if
there's some good reason for not loading CSS if JS doesn't load, we could add a
'requireJavascript' => true option to the module definition array.

This is an optimistic bug report - I suspect that we'll continue doing this
"wrong" (in my opinion) for the near future. If I'm thinking about it wrong and
there's a better way to be able to rely on the ResourceLoader while maintaining
compatibility with no-js clients, I'd love to hear it.

Thanks!

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