私はこのようなコードを持っています。
function A(){}
Object.defineProperties(A.prototype,{
'propName' : {
'get' : function(){
return 'hallo';
},
'set' : function( p ){
console.log( 'setting...' );
}
}
});
function B(){
A.call( this )
}
B.prototype = Object.create( new A(), {
'propName' : {
'get' : function(){
//do something than call getter of parent prototype
},
'set' : function( p ){
//do something than call setter of parent prototype
},
}
});
ゲッターまたはセッターのプロトタイプを呼び出すことは可能ですか?はいの場合、どのように行いますか?
グレッティング....