On Sat, Oct 1, 2011 at 9:05 AM, François REMY <[email protected]>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
[email protected]
https://mail.mozilla.org/listinfo/es-discuss