Adam Judson napisaƂ(a):
Thanks,
  works perfectly.

Now can you explain why...

I get that __proto__ works, it's a tricky Mozilla thing.

Why didn't any of:
  A.prototype.prototype

"prototype" slot is only defined in functions, A.prototype is object, so it doesn't have one.

__proto__ is equivalen of prototype for objects.

  A.prototype.constructor.prototype

This is drawback of A.prototype = {...} since now A.prototype.constructor === {...}.contructor === Object If you need to have working constructor slot you need to store new properties in old prototype object, or you can set contructor in new object, but this will be visible in for (i in obj) loop.

--
Pozdrawiam,
  Pawel Chmielowski
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners

Reply via email to