import { el } from "deka-dom-el"; import { mnemonicUl } from "../mnemonicUl.html.js"; export function mnemonic(){ return mnemonicUl().append( el("li").append( el("code", "on(, [, ])()"), " — just ", el("code", ".addEventListener(, [, ])") ), el("li").append( el("code", "on.(, [, ])()"), " — corresponds to custom elemnets callbacks ", el("code", "Callback(...){...}"), ". To connect to custom element see following page, else it is simulated by MutationObserver." ), el("li").append( el("code", "dispatchEvent([, ])(element)"), " — just ", el("code", ".dispatchEvent(new Event([, ]))") ), el("li").append( el("code", "dispatchEvent([, ])(element, detail)"), " — just ", el("code", ".dispatchEvent(new CustomEvent(, { detail, ... }))") ), ); }