pota/use/dompota/use/dom is the low-level DOM helper module the renderer itself
uses. It re-exports a few platform globals pre-bound to document and
wraps the imperative APIs that pota's internals lean on — attribute /
class / part manipulation, tree walking, and a couple of niche
utilities like isPlaying and cleanJSXText. Most app code doesn't
need it; it's documented because it ships as a public subpath.
document — window.documenthead — document.headdocumentElement —
document.documentElementDocumentFragment — the constructoractiveElement() —
document.activeElementcreateElement(tag) — HTML elementcreateElementNS(ns, tag) — namespaced
elementcreateTextNode(text) — text nodecreateComment(text) — comment / anchor
nodeimportNode(node, deep?) —
document.importNodecreateTreeWalker(root, what?) —
document.createTreeWalkerisConnected(node) — node.isConnectedisPlaying(el) — is a media element
progressing?setAttribute(node, …) — platform
setAttributehasAttribute(node, …) — platform
hasAttributeremoveAttribute(node, …) — platform
removeAttributeaddClass(node, str|array) — classList.addremoveClass(node, str|array) —
classList.removeaddPart(node, …) — node.part.addremovePart(node, …) — node.part.removetokenList(s) — trim + split by whitespacequerySelector(node, query) — per-node
querySelectorquerySelectorAll(node, query) —
per-node querySelectorAllwalkElements(node, max?, nodes?) —
depth-first element walkgetDocumentForElement(node) —
owning Document / ShadowRootcleanJSXText(value) — JSX whitespace
normalisationgetValueElement(value, ...args) —
resolve a value to a NodetoDiff(prev, next, short?) — remove stale nodes
for <For/>Pre-bound creators (createElement, createTextNode, …) are bound to
document, so calls are a method dispatch lighter than the platform
versions and can be passed around as values. The attribute / class /
part helpers are direct passthroughs over their Element counterparts
— prefer JSX attributes / properties or class:* in components; these
are imperative escape hatches for library code.