That sounds quite sufficient for me.
Do we have plans to backport Cu.import to ES6 modules?

Cheers,
 David

On 10/8/13 10:24 PM, Jason Orendorff wrote:
> Here's the simplest way to monkeypatch an ES6 module:
> 
>     1. Use System.get("x") or System.import("x", callback) to get the
> Module object.
>     2. Make your own Module object to replace it (which is like, `new
> Module({a: my_a, b: my_b})`)
>     3. Use System.set(x, my_module) to put your patched module into the
> loader.
> 
> No custom module loader is needed for that. However, the scope of this
> style of monkeypatching is strictly per-Loader, and each global gets its
> own Loader (like all other builtins). We do need some customization to
> support system-wide monkeypatching. But we were going to need some
> customization anyway just for stuff like mapping module names to chrome:
> URLs or whatever.
> 
> -j
> 
> _______________________________________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform


-- 
David Rajchenbach-Teller, PhD
 Performance Team, Mozilla
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to