Skip to content

Commit

Permalink
add mixin warning
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Sep 11, 2012
1 parent bfb335c commit d4919f1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ var obj = {};
Emitter(obj);
Emitter(User.prototype);
```

__Warning__: if you use `Emitter(Some.prototype)` on a prototype
you __must__ invoke `Emitter.call(this)` in the constructor to
clear the callbacks object, otherwise events will be shared
between multiple objects.

### Emitter#on(event, fn)

Expand Down

0 comments on commit d4919f1

Please sign in to comment.