https://bugzilla.wikimedia.org/show_bug.cgi?id=71621
--- Comment #11 from Krinkle <[email protected]> --- (In reply to Krinkle from comment #9) > (In reply to Kunal Mehta (Legoktm) from comment #7) > > (In reply to Krinkle from comment #5) > > > This would result in loading only part of a module, which is in my opinion > > > against expectations. > > > > We already serve only the CSS of the module to no-JS users, so it's not > > totally against expectations. > > > > No we don't. Only for exceptional modules that are designed specifically to > be a base module without javascript, loaded explicitly via addModuleStyles, > thus bypassing ResourceLoader. If you're loading a regular module containing > javascript files via addModuleStyles, you're doing it wrong. It doesn't > throw an exception for that right now, but we should if that helps. > > When writing css rules in a stylesheet loaded by ResourceLoader one should > be able to assume javascript execution alongside of it. > For the 'site' module you are absolutely right of course. In general a module is either executed regularly (addModules/mw.loader.load) or styles only (e.g. Vector skin; addModuleStyles/load.php only=styles). In case of the 'site' wiki-page module, it is loaded with both addModuleStyles and addModuleScripts separately because the scripts have to execute in the global javascript context for legacy reasons, and Common.css historically is both the companion of Common.js as well as the standalone stylesheet for wiki content (e.g. infobox, or fallback styles for collapsible elements). -- 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
