Creates a callback method that retains a parameter, given the function to call back and the parameter to pass to it.
public static function createCallback(
method : Function,
context : Object
) : Function
Parameter | Description |
|---|
method | The function for which the callback method will be created. |
context | The parameter to pass to the function. This parameter can be null, but it cannot be omitted. |
The callback function.
Use this method to set up a handler for a DOM event that retains a parameter. The callback function will be called with the DOM event as the first parameter and context as the second parameter.
Reference