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

no need to check for existence of _events on bind/unbind/trigger #7

Open
millermedeiros opened this issue Apr 8, 2011 · 1 comment

Comments

@millermedeiros
Copy link

The variable should be created inside the mixin method since microevents can't work without it. That way you avoid checking if the variable exist and reduce code duplication.

@ghost
Copy link

ghost commented Jan 26, 2012

I think a good way would be to set this._events = {} in the MicroEvent function. Then you would have to do the following in your functions...

function Test() {
  MicroEvent.call(this);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant