Coffeekraken.io 0.0.1

SEvent

Proxy class to create custom events that can be dispatched through the standard dispatch method on any HTMLElement

Example

    let myEvent = new SEvent('myCoolEvent', {
        cancelable : true,
        bubbles : false,
        detail : {
            // some datas to send with the event
        }
});
// dispatch the event from an HTMLElement
myHTMLElement.dispatch(myEvent);

See more : https://www.npmjs.com/package/customevent

Author : Olivier Bosselolivier.bossel@gmail.com

Constructor

Name Type Description Status Default
name { String } The event name required
settings { Object } The event settings required

Settings

Here's the list of available settings.

cancelable

Set if the event is cancelable or not

Type : { Boolean }

Default : true

bubbles

Set if the event will bubble or not

Type : { Boolean }

Default : true

detail

Pass an object that will be sent with the event

Type : { Object }

Default : null