mirror of
https://github.com/jaandrle/deka-dom-el
synced 2025-07-04 21:42:14 +02:00
🔤 Improves and updates docs
- customElementRender - introduction example
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { signals } from "./signals-common.js";
|
||||
import { enviroment as env } from './dom-common.js';
|
||||
|
||||
//TODO: add type, docs ≡ make it public
|
||||
export function queue(promise){ return env.q(promise); }
|
||||
/** @type {{ scope: object, prevent: boolean, host: function }[]} */
|
||||
const scopes= [ {
|
||||
|
@ -8,6 +8,7 @@ export function dispatchEvent(name, options, host){
|
||||
d.unshift(element);
|
||||
element= typeof host==="function"? host() : host;
|
||||
}
|
||||
//TODO: what about re-emmitting?
|
||||
const event= d.length ? new CustomEvent(name, Object.assign({ detail: d[0] }, options)) : new Event(name, options);
|
||||
return element.dispatchEvent(event);
|
||||
};
|
||||
|
Reference in New Issue
Block a user