Shouldn't this.val in function initialize own the property 'a'?

Mootools more URI.schemes also doesn't own its properties like http,
https etc.
But Swiff.options does own all its properties.

On 25 aug, 11:10, Thierry bela nanga <[email protected]> wrote:
> I guess
>
> TFalse.val //undefined
> TFalse.prototype.val //defined
>
> ?
>
>
>
> On Tue, Aug 25, 2009 at 10:03 AM, woomla <[email protected]> wrote:
>
> > Running the code below shows that class TFalse.val.hasOwnProperty('a')
> > === false.
> > Why is that? Can I not use hasOwnProperty?
>
> > e.q. URI.schemes does not own its properties http, https etc.
> > It seems that property options does own its properties.
>
> > Should I use hasOwnProperty in this case? I use it in this way:
> > for (key in this.val)
> > {
> >    if (this.val.hasOwnProperty(key))
> >    {
> >        //do something with this.val[key]
> >    }
> > }
>
> > code:
>
> >    var TFalse, TTrue;
>
> >    TFalse = new Class(
> >    {
> >      val:
> >      {
> >        a: 0
> >      },
> >      initialize: function ()
> >      {
> >        console.log(this.val.hasOwnProperty('a'));
> >      }
> >    });
>
> --http://tbela99.blogspot.com/
>
> fax : (+33) 08 26 51 94 51

Reply via email to