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([, ])([, ])"), " — just ", el("code", ".dispatchEvent(new Event([, ] ))"), " or ", el("code", ".dispatchEvent(new CustomEvent(, { detail: }))") ), el("li").append( el("code", "dispatchEvent([, ], )([])"), " — just ", el("code", "().dispatchEvent(new Event([, ]))"), " or ", el("code", "().dispatchEvent(new CustomEvent(, { detail: }[, ] ))"), " (see scopes section of docs)" ), ); }