In web content, that's also the case with ES6 and require-style modules.
I realize that it's a bit more complicated in chrome code, with all the
XUL + XBL + XPCOM + subscript loader, but I believe that we should be
able to reach the same result.

Cheers,
 David

On 26/09/16 18:01, Joshua Cranmer 🐧 wrote:
> On 9/24/2016 5:13 PM, David Teller wrote:
>> Which begs the question: what's the point of `Cu.import` these days?
> 
> One major difference between Cu.import and ES6/require-style modules is
> that only one version of the script is created with Cu.import. This
> allows you to make databases using Cu.import--every code that calls that
> Cu.import file, whether a chrome JS file or an XPCOM component
> implementation, will be guaranteed to see the same objects once the call
> is made. There are definitely modules that rely on this.
> 
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to