Re: Faking host objects

Hi François,   

On Sunday, 30 December 2012 at 01:10, Marcos Caceres wrote:

>  
>  
> On Sunday, 30 December 2012 at 00:05, François REMY wrote:
>  
> > Not completly generic yet, but I’ve a good version already:
> >  
> > http://pastebin.com/Zi4G4diV
> Thanks! Will have a good look tomorrow.

I couldn't resist… I plugged in bits of your code and it worked :D You rock, François!  

Though, I'm still confused as to where I screwed up. Maybe you can help me understand?  

Just some things I did notice in your code:

WebIDL says:  
"Since an interface object for a non-callback interface is a function object, it will have a “prototype” property with attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }."  

While yours has enumerable true. No biggy.    

I had problems with eval() and strict mode, which is why I used the function constructor.  

Thanks again!  

Received on Sunday, 30 December 2012 01:51:46 UTC