Created
April 16, 2015 15:42
-
-
Save carmichaelize/e8cc070520f3d7a0802f to your computer and use it in GitHub Desktop.
Bind array values as function params.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (_button){ | |
_button.action = callback; | |
//Bind params | |
if(params) _button.action = _button.action.bind.apply(_button.action, [null].concat(params)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment