[Bug 48885] VisualEditor: Load visualeditor modules in a closure mapping $/mw/ve to their globals

2014-11-18 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=48885

James Forrester jforres...@wikimedia.org changed:

   What|Removed |Added

   Assignee|jforrester+veteambztickets@ |krinklem...@gmail.com
   |wikimedia.org   |
   Target Milestone|--- |VE-deploy-nextup

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 48885] VisualEditor: Load visualeditor modules in a closure mapping $/mw/ve to their globals

2014-07-07 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=48885

Krinkle krinklem...@gmail.com 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 krinklem...@gmail.com ---
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
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l