> Regardless of the "this" binding, the privately keyed method will not 
> be copied over from the source object and hence will be undefined when 
> called. 

I think you're not understanding. Here's a simpler example that runs in modern 
ES engines:

    var A = {
        foo: function() {
            console.log('foo');
        },
        bar: function() {
            console.log('bar');
            this.foo();
        }
    };

    var B = { };
    B.bar = A.bar.bind(A);

    B.bar();

This logs "bar" and then "foo", so foo is correctly called, even though it is 
not a method of B.                                          
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to