16 Mar 2012 20:15
Re: Node's __proto__
Eric J. Van der Velden <ericjvandervelden <at> gmail.com>
2012-03-16 19:15:09 GMT
2012-03-16 19:15:09 GMT
On Mar 12, 7:00 am, Bobby Holley <bobbyhol... <at> gmail.com> wrote: > Hi Eric, > > |Node| and |Element| are both constructor objects. They both have the same > proto, and it's very uninteresting (the proto of that object is > Object.prototype). > > Things like |Node| and |Element| are just kind of waystations on the way to > things like Node.prototype and Element.prototype. Those are the __proto__s > for actual Node and Element instances, and they form a nice inheritance > hierarchy (ie: Element.prototype.__proto__ === Node.prototype). > > But we also do a lot of that stuff wrong in Gecko, as it stands. For > example, each prototype has a flattened version of all methods and > properties it inherits. But we're fixing this all soon. > > Cheers, > bholley > > On Sun, Mar 11, 2012 at 6:49 AM, Eric J. Van der Velden < > > > > > > > > ericjvandervel... <at> gmail.com> wrote: > > Hello, >(Continue reading)
RSS Feed