ekho

DOM-agnostic event library + bubbling!

This library is not actively maintained anymore.
Last updated 7 years ago by killdream .
Repository · Original npm · Tarball · package.json
$ cnpm install ekho 
SYNC missed versions from official npm registry.

Ekho

Build Status Dependencies Status

A DOM-agnostic eventing library with bubbling.

Example

// Inherit from Eventful
var Thing = Eventful.derive({
  say:
  function _say(message) {
    this.trigger('say', message)
  }
})

// Instantiate
var foo = Thing.make()
var bar = Thing.make(foo) // bar events will bubble to foo

// Attach some listeners
foo.on('say', function(a) {
  console.log('foo:', a)
})

bar.on('say', function(a) {
  console.log('bar:', a)
})

// Then trigger the events
bar.say('Hello')
// => bar: Hello
// => foo: Hello

foo.say('Hello')
// => foo: Hello

Installing

$ npm install ekho

Platform support

This library assumes an ES5 environment, but can be easily supported in ES3 platforms by the use of shims. Just include es5-shim :3

browser support

Licence

MIT/X11. i.e.: Do whatever you fucking want, bro.

Current Tags

  • 0.4.0                                ...           latest (7 years ago)

5 Versions

  • 0.4.0 [deprecated]           ...           7 years ago
  • 0.3.0 [deprecated]           ...           8 years ago
  • 0.2.1 [deprecated]           ...           8 years ago
  • 0.2.0 [deprecated]           ...           8 years ago
  • 0.1.0 [deprecated]           ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (3)

Copyright 2014 - 2017 © taobao.org |