license /**
 * A convenience function for firing custom events.
 *
 * ```javascript
 * fire('eventname', someElement, {foo: 'bar'});
 * ```
 */ export function fire ( name , target , detail ? ) { const opts = { bubbles : true , detail , composed : true } ; const evt = new CustomEvent < typeof detail > ( name , opts ) ; target . dispatchEvent ( evt ) ; return evt ; }