[Project_owners] JavaScript prototype question

Pawel Chmielowski prefiks at civ.pl
Tue Dec 6 20:25:21 EST 2005


Adam Judson napisał(a):
> I thought I understood this...
> 
> I have
> 
> function A() = ...
> 
> A.prototype = {...}
> 
> and now I want to add
> 
> A.prototype.prototype = new SuperClass();

A.prototype.__proto__= new SuperClass()

or my favourite method

function A(){SuperClass.call(this, arg1, arg2); ...}
A.prototype = {
   __proto__: SuperClass.prototype,
   ...
}

-- 
Pozdrawiam,
   Pawel Chmielowski


More information about the Project_owners mailing list