-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
395 additions
and
282 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
DOM Event Emitter | ||
================== | ||
|
||
One heritage of event emitter, this handler native DOM events. Use with `var DOMEventEmitter = Rye.require('Events').DOMEventEmitter`. | ||
|
||
To intanciate one emitter you do `var emitter = new DOMEventEmitter(element)`. | ||
|
||
|
||
addListener (on) | ||
------------------ | ||
<div class="api"> | ||
emitter.addListener(name, fn) <span>⇒ self</span><br> | ||
emitter.on(element, name, fn) <span>⇒ self</span> | ||
</div> | ||
|
||
|
||
once (one) | ||
------------------ | ||
<div class="api"> | ||
emitter.once(name, fn) <span>⇒ self</span><br> | ||
emitter.one(name, fn) <span>⇒ self</span> | ||
</div> | ||
|
||
|
||
removeListener (off) | ||
------------------ | ||
<div class="api"> | ||
emitter.removeListener(name[, fn]) <span>⇒ self</span><br> | ||
emitter.off(name[, fn]) <span>⇒ self</span> | ||
</div> | ||
|
||
|
||
destroy | ||
------------------ | ||
<div class="api"> | ||
emitter.destroy() <span>⇒ self</span> | ||
</div> | ||
|
||
|
||
trigger | ||
------------------ | ||
<div class="api"> | ||
emitter.trigger(name[, data]) <span>⇒ self</span> | ||
</div> | ||
|
||
|
||
emit | ||
------------------ | ||
<div class="api"> | ||
emitter.trigger(name[, data]) <span>⇒ self</span> | ||
</div> | ||
|
||
|
||
proxy | ||
------------------ | ||
<div class="api"> | ||
emitter.proxy(name) <span>⇒ function</span> | ||
</div> | ||
|
Oops, something went wrong.