2010/5/20 ๏̯͡๏ Jasvir Nagra <jas...@gmail.com>: > The other is to limit the scope from which the imported modules imports get > selected to the current scope: > module Fribble {} > module Foo { > module JQ = load 'http://....'; > module Drawing = load 'http://.../gun.js'; > module A = load 'http://.../a.js'; > } > module Bar { > module JQ = load 'http://....'; > module Drawing = load 'http://.../gui.js'; > module B = load 'http://.../b.js'; // module B gets JQ and Drawing but it > can't utter something to get it the shared Fribble > }
Two things about this. This is the recommended solution to this problem in our proposal, since it eliminates accidental access to the Drawing module. But note that all modules have access to Fribble, since it's in the scope chain. Also, what you've written loads the JQ module twice - probably you want to only load that once, and have it shared. -- sam th sa...@ccs.neu.edu _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss