SAP UI5 フレームワークを使用しています。クラスのインスタンスを作成してから、クラスのコンストラクターを変更しています。クラスの 2 番目のインスタンスを作成している間、新しいコンストラクターは呼び出されません!
var myConstructor = function(){
alert('my own constructor');
}
var btn = new sap.m.Button({text:'Hello World'}) //sap.m.Button is a class
sap.m.Button.prototype.constructor = myConstructor; //Changing the constrcutor
var btn2 = new sap.m.Button({text:'h'}); // why myConstructor aint called !
これが実際の例ですhttp://jsbin.com/voluc/2/edit
ありがとう