This feature is experimental. Please share your experiences so we know what to keep or change.
Builds an event with the given type and properties.
The returned event is not emitted.
let event = up.event.build('my:event', { foo: 'bar' })
console.log(event.type) // logs "my:event"
console.log(event.foo) // logs "bar"
console.log(event.defaultPrevented) // logs "false"
up.emit(event) // emits the event
The event type.
May also be passed as a property { type }
.
An object with event properties.
The event type.
May also be passed as a first string argument.