Dynamic Modules Questions

Aymeric Vitte vitteaymeric at gmail.com
Thu Mar 21 09:22:31 PDT 2013


Le 06/03/2013 23:31, Sam Tobin-Hochstadt a écrit :
>> >2)  What is the nature of the bindings created with the Module constructor?
>> >In the following scenario, what is output?
>> >
>> >     var a = 123;
>> >     var M = new Module({ a: a });
>> >
>> >     a = 456;
>> >     console.log(M.a === a); // bound to "var a" or a new binding?
> This logs `false`.
>

Does Module support the structured cloning ? (ie can you store M in 
indexedDB for example ?)

Example, could we store M :

var a='123';
var M=new Module({ a: function(data) {return window.something(a,data) } });

Regards,

-- 
jCore
Email :  avitte at jcore.fr
iAnonym : http://www.ianonym.com
node-Tor : https://www.github.com/Ayms/node-Tor
GitHub : https://www.github.com/Ayms
Web :    www.jcore.fr
Webble : www.webble.it
Extract Widget Mobile : www.extractwidget.com
BlimpMe! : www.blimpme.com



More information about the es-discuss mailing list