Skip to content

Handle event bubbling #5

Open
Open
@arboleya

Description

@arboleya

Something like:

var happens = require('happens');

var a = happens();
var b = happens().bubble(a);

a.on('change', function(){
   console.log('changed a');
});

b.on('change', function(){
   console.log('changed b');
});

b.emit('change'); // 1) change b 2) changed a

There needs to be a way to stop the bubbling at any time though. No event (instance) param should be passed along any event handler, for clean signature.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions