I have been struggling with the use of these \"this\" with the .bind() method and the use of the variable \"self = this\". In getting two different results with those, so I\'m m
Be careful, self
will always refer to the last instanciated object :
var c1 = new Callback();
var c2 = new Callback(); // overrides previous self
Then following line actually sets c2.html_element
:
c1.set_html_element(html_element);
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Closures
That said, replacing this
is completely useless in your case.