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

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |javascript

--- Comment #17 from [email protected] 2012-01-24 19:34:56 UTC ---
There should be some way to import a minified version of
[[MediaWiki:SomePage.js]] or [[User:AnotherPage.js]], and importScript
currently doesn't do that. I don't know which bug needs to be fixed in order to
have this functionality (bug 27561? bug 27535?).

I believe such a feature is necessary if we want to avoid loading the full code
of a script in the case of certain conditions are met. For example, if we
create a long script which we want to be loaded only on [[ThisPage]], it seems
desirable to be able to create a loader script with something like this:
----
if ( mw.config.get( 'wgPageName') === 'ThisPage' ) {
    importMinifiedScript( 'FromAnotherPage.js' );
}
----

Then, the JavaScript 'FromAnotherPage.js' wouldn't be loaded unless it is
needed.

See also [[mw:Thread:Talk:ResourceLoader/Migration guide (users)/Minifying
central gadgets]].

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