[Project_owners] JavaScript prototype question

Adam Judson adamsplugins at gmail.com
Tue Dec 6 16:37:08 EST 2005


On 06/12/05, Aaron Boodman <zboogs at gmail.com> wrote:
>
> You just need to remember that "prototype" is for constructors. The
> value of the prototype goes into __proto__ in the objects that the
> constructor creates. __proto__ is the actual lookup chain, not
> prototype.
>
> So when you do a.b, b is checked for on a, then a.__proto__.b, then
> a.__proto__.__proto__.b, and so on. Prototype has nothing to do with
> this, except for the fact that in the ECMA spec, it is the only way to
> set __proto__.


Thanks,  that explanation provided the "aha" I was looking for.

A


> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
>


More information about the Project_owners mailing list