I have the following code.
How can I execute the the clearSearch method as part of the methods Array?
//Assume this is in a different file, inside a controller.
//I have access to the controller through a global variable.
function clearSearch() {
console.log('Search cleared');
}
.
function Task() {
this.controllers = [];
this.stores = [];
this.methods = [];
}
var taskList = [];
var task = new Task();
task.controllers.push('Search');
task.stores.push('search.Case', 'search.Result');
task.methods.push('clearSearch');
taskList.push(task);
clearSearchmethod? Where is it defined?