On Sat, Oct 1, 2011 at 9:05 AM, François REMY <fremycompany_...@yahoo.fr>wrote:
> In my understanding, *super* would be null. > > What would be more complex is : > > var widget = { > hookup: function() { > // |this| is widget > // |super| is widget > window.addEventListener('load', function(event) { > // |this| is widget > // |super| ?? > }.bind(this), false); > > Unfortunately my example and your fix are both impractical. We have to bind the function *and* save a reference to it because we don't have garbage collection. That provides another example to try to understand super: this.loadHandler = function(event){ // this is widget // Now super? }.bind(this); window.addEventListener('load', this.loadHandler, false); > } > }; > widget.hookup(); > > jjb
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss