0448437
2017/10/10(火) 21:33:32.89ID:E6KH4Zj5一旦最小構成でテストしてみたら最初のままで通用してしまいました
var Hoge = function( elementId ){
this.div = document.getElementById( elementId );
};
Hoge.prototype.foo = function(){
var button = document.createElement( "input" );
button.type = "button";
button.value = "ボタン";
this.div.appendChild( button );
button.addEventListener( "click", this.bar( this ), false );
};
Hoge.prototype.bar = function( arg ){
console.log( "arg is..." ); //
console.log( arg ); // object
};
var hoge = new Hoge( "test" ); // <div id="test"></div>
hoge.foo();