That is quite similar to what I was alluding to about above. I think adding nonstandard functions to the prototype of language builtins like Object will be odd for developers who know JS well. But we can accomplish essentially the same thing with Components by changing the line in Component.prototype.connect:
That is quite similar to what I was alluding to about above. I think adding nonstandard functions to the prototype of language builtins like Object will be odd for developers who know JS well. But we can accomplish essentially the same thing with Components by changing the line in Component. prototype. connect:
this.connections[0] = engine. makeConnection( this.group, this.outKey, this.output);
to
this.connections[0] = engine. makeConnection( this.group, this.outKey, this.output. bind(this) );