1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2025-07-01 20:32:13 +02:00

dispatch

This commit is contained in:
2025-03-05 14:39:19 +01:00
parent e1f2b32736
commit 1c5f0dab5e
14 changed files with 42 additions and 11 deletions

View File

@ -11,6 +11,7 @@ import { oAssign, onAbort } from './helpers.js';
* @returns {Function} Function that dispatches the event
*/
export function dispatchEvent(name, options, host){
if(typeof options==="function"){ host= options; options= null; }
if(!options) options= {};
return function dispatch(element, ...d){
if(host){