This feature is experimental. It may be changed or removed in a future version.
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.