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

Implement custom event emitters for DOM events (namespaces substitute) #4

Closed
ricardobeat opened this issue Dec 21, 2012 · 2 comments
Closed

Comments

@ricardobeat
Copy link
Member

No description provided.

@jcemer
Copy link
Member

jcemer commented Dec 22, 2012

var el = Rye(document)
  , emitter = el.events({
      'click': fn
    })

el.on('click', fn)
el.off('click')

Are removed all handlers in this code?

@jcemer
Copy link
Member

jcemer commented Dec 24, 2012

Final and implemented syntax.

var DOMEventEmitter = Rye.require('DOMEventEmitter')
myEmitter = new DOMEventEmitter(document)

myEmitter.on({
    'click .bacon': function(){ ... }
  , 'blur .bacon': function(){ ... }
})

myEmitter.destroy()

@jcemer jcemer closed this as completed Dec 24, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants