Hi guys,
until now I make so:
[html]
<div id="my_div"><!-- content --></div>
[simple-js]
MyClass.prototy pe.doSomething = function( ) {};
MyClass.prototy pe.assignFun = function( )
{
var selfObj = this;
document.getEle mentById('my_di v').onclick = function ( e )
{
selfObj.doSomet hingWith( e || event );
}
}
How do I avoid the closure of my object reference?
And MyClass is not a Singleton...
until now I make so:
[html]
<div id="my_div"><!-- content --></div>
[simple-js]
MyClass.prototy pe.doSomething = function( ) {};
MyClass.prototy pe.assignFun = function( )
{
var selfObj = this;
document.getEle mentById('my_di v').onclick = function ( e )
{
selfObj.doSomet hingWith( e || event );
}
}
How do I avoid the closure of my object reference?
And MyClass is not a Singleton...
Comment