U
Ugo
Hi guys,
until now I make so:
until now I make so:
HTML:
<div id="my_div"><!-- content --></div>
[simple-js]
MyClass.prototype.doSomething = function( ) {};
MyClass.prototype.assignFun = function( )
{
var selfObj = this;
document.getElementById('my_div').onclick = function ( e )
{
selfObj.doSomethingWith( e || event );
}
}
How do I avoid the closure of my object reference?
And MyClass is not a Singleton...