Re: [Wikitech-l] "Unloading"/reloading ResourceLoader modules the proper way?

2017-06-19 Thread Jack Phoenix
Thanks for the replies, everyone. On Mon, Jun 19, 2017 at 8:42 PM, Bartosz Dziewoński wrote: > I don't think "unloading" modules will ever be a thing. While > ResourceLoader could be made to keep track of modules' CSS to be able to > remove it, we can't "unload" JavaScript modules at all (because

Re: [Wikitech-l] "Unloading"/reloading ResourceLoader modules the proper way?

2017-06-19 Thread Bartosz Dziewoński
I don't think "unloading" modules will ever be a thing. While ResourceLoader could be made to keep track of modules' CSS to be able to remove it, we can't "unload" JavaScript modules at all (because their code has already executed), so I'm not sure if we'd want to add such special case. If you wan

Re: [Wikitech-l] "Unloading"/reloading ResourceLoader modules the proper way?

2017-06-19 Thread Brad Jorsch (Anomie)
On Mon, Jun 19, 2017 at 2:14 AM, Legoktm wrote: > Hi, > > On 06/18/2017 01:00 PM, Jack Phoenix wrote: > > What would be the proper way to signal to ResourceLoader, "actually I > > need you to load this module again"? > > I don't think ResourceLoader was really designed for the concept of > "unloa

Re: [Wikitech-l] "Unloading"/reloading ResourceLoader modules the proper way?

2017-06-18 Thread Legoktm
Hi, On 06/18/2017 01:00 PM, Jack Phoenix wrote: > What would be the proper way to signal to ResourceLoader, "actually I > need you to load this module again"? I don't think ResourceLoader was really designed for the concept of "unloading" modules. Instead I'd suggest scoping the CSS to some class

[Wikitech-l] "Unloading"/reloading ResourceLoader modules the proper way?

2017-06-18 Thread Jack Phoenix
Hi all, I've been working on enhancing the Theme extension [1] to add a preference option so that registered users can set their preferred theme [2], just like how they can set a skin and other such options. The theme selector is shown on Special:Preferences, below the list of available skins, an