Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[js:core] pass an event object as this into callback of fm.bind() or fm.one() #1996

Closed
nao-pon opened this issue May 7, 2017 · 0 comments
Closed
Assignees
Labels

Comments

@nao-pon
Copy link
Member

nao-pon commented May 7, 2017

The event object has the data passed in fm.trigger() in the data attribute. However, if the data to be handled is large, it becomes overhead of script execution.

fm.bind('open', function(event) {
    event; // event object
    event.data // data passed in fm.trigger()
});

For more light way

fm.bind('open', function() {
    this; // Make `this` an event object
    this.data // undefind, this has not data
});
@nao-pon nao-pon added the feature label May 7, 2017
@nao-pon nao-pon self-assigned this May 7, 2017
@nao-pon nao-pon closed this as completed in 5eca027 May 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant