be-composed
v0.0.8
Published
Fire an event with different characteristics from the original event.
Downloads
11
Maintainers
Readme
be-composed
be-composed allows us to rebroadcast events that don't bubble or don't "compose" to a different name that does bubble and/or compose.
Doing so imposes a bit of an expectation that the name should be namespaced or made unique, to avoid confusing with events from other components.
In the extreme, we could use a guid, as demonstrated below:
Syntax
<input be-composed='{
"dispatch":{
"change":{
"as": "402735ed-b9e8-4ef4-9e0d-3a6b385de863",
"bubbles": true,
"composed": true,
"cancelable": true,
"stopPropagation": true,
}
}
}'>
"stopPropagation" prevents the original event from continuing to propagate. The original event and detail are placed inside the detail of the new event.