Hi,

In the Object.keys function, it is using the hasOwnProperty function as a 
test before returning keys, and it will return false if the key comes from 
an inherited (ie prototype) property.

During the mootools Class object creation, the object passed in parameter 
is merged in the prototype of the object Class, so you can't get the keys 
with Object.keys().


I hope to be understandable, cheers, Olivier Gasc

Le mercredi 10 octobre 2012 14:50:55 UTC+2, Lee a écrit :
>
> I'm sure I'm doing something daft, but 
> why doesn't Object.keys(this.obj) work? 
>
> http://jsfiddle.net/leegee/cvrvK/4/ 
>
> Thanks... 
>
> Lee 
>

Reply via email to