I'm trying to set an object's "touched" function to another function. I hear about JavaScript and first class functions all the time but still don't have the hang of it. Here's what I have:
customClose.touched = this._close.bind(this);
customClose has a function called "touched" that is empty by default. I want it to be set to another function, this._close.bind, which takes a parameter. How can I make this work?