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

Krinkle <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |67642
            Summary|VisualEditor: jQuery and    |VisualEditor: Load
                   |mediaWiki globals should be |visualeditor modules in a
                   |used through closures, not  |closure mapping $/mw/ve to
                   |directly through $ and mw   |their globals

--- Comment #3 from Krinkle <[email protected]> ---
Rephrasing bug.

Problems:


* We're repeatedly referencing $/mw from global scope instead of securing the
reference. This is worse for performance and for proper functioning (e.g.
jQuery might be redefined at a later time causing version mismatches, this is
why ResourceLoader maps $) 

* We're using $ and mw directly instead of mapping jQuery and mediaWiki.

* In standalone, our code executes in the global scope. This is bad.

Solution:

* For standalone, build the dist/ files with a closure mapping, securing and
caching '$' from 'jQuery'. And for VE modules other than ve.base, it would also
map 've' to 'VisualEditor' (bug 67642)

* In MediaWiki, ResourceLoader already provides a closure which we'd extend to
also map 've' to 'VisualEditor'.

-- 
You are receiving this mail because:
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