Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

JS / DOM / Web API ledger

Legend: ✅ supported today · 🟡 not supported yet, but planned · ⛔ won’t be supported. Tier T0–T3. Since = the superui version a capability first shipped in.

document

APIStatusTierSinceNotes
document.getElementById(id)✅T00.1
document.querySelector(sel)✅T00.1type/class/id/descendant + attribute/grouping/pseudo selectors
document.querySelectorAll(sel)✅T00.1returns a real JS array
document.createElement(tag)✅T00.1
document.createTextNode(data)✅T00.1
document.body✅T10.3.4the root element
document.head🟡T1—no head element today
document.getElementsByClassName / getElementsByTagName🟡T2—use querySelectorAll for now
document.createDocumentFragment()🟡T2—

Node / Element — structure

APIStatusTierSinceNotes
appendChild / removeChild✅T00.1
insertBefore / replaceChild✅T00.1
parentNode / childNodes / children✅T00.1children = element children only
firstChild / nextSibling / previousSibling✅T10.1
nodeType / tagName✅T10.1tagName upper-cased, element-only
cloneNode🟡T2—
remove / closest / matches / append / prepend🟡T2—use removeChild/appendChild for now
innerHTML (get/set)🟡T1—parse-on-set is roadmap

Element — attributes / content / state

APIStatusTierSinceNotes
getAttribute / setAttribute / removeAttribute / hasAttribute✅T00.1
id / className✅T00.1
textContent / innerText✅T00.1
text node .data / .nodeValue / .textContent (get/set)✅T00.1mutate a Text node’s value from JS — Supersolid text bindings
value (get/set)✅T10.1text inputs render value
checked (get/set)✅T10.1drives :checked
classList.add/remove/toggle/contains✅T00.1
style.setProperty / getPropertyValue✅T10.1inline style
style.<camelCase> (el.style.color = …)🟡T1—single-word props like el.style.color write through, but camelCase multi-word (backgroundColor) isn’t converted to kebab-case, so it won’t match — use setProperty
dataset🟡T2—use getAttribute("data-*") for now
getBoundingClientRect() / getComputedStyle()🟡T2—getBoundingClientRect is bound but returns zeros (no post-layout read-back yet); getComputedStyle not installed
scrollTop / scrollLeft (get/set)🟡T2—programmatic scroll offset — mouse-wheel scrolling works natively
scrollTo / scrollBy / scrollIntoView🟡T2—
focus() / blur()🟡T1—focus is set on click today

Events

APIStatusTierSinceNotes
addEventListener / removeEventListener✅T00.1capture flag honored
capture → target → bubble dispatch✅T00.1W3C order
event.target / currentTarget✅T00.1
event.type / defaultPrevented✅T00.1
event.preventDefault / stopPropagation / stopImmediatePropagation✅T00.1
click✅T00.1on pointer click
change✅T10.1fired on checkbox toggle; for text inputs, fired on blur if the value changed since focus
input (text field)✅T10.1fired on text change; coalesced to one input per frame in which the text changed, not one per character
keydown / keyup✅T10.1dispatched to focused node
event.key✅T10.1key identity, e.g. "Enter", "Backspace", "a"
event.keyCode / code🟡T1—not exposed yet — use event.key
event.clientX/Y / offsetX/Y🟡T2—pointer coordinates not exposed yet
dispatchEvent / new CustomEvent / new Event🟡T2—
submit🟡T1—no <form> submit wiring yet
focus / blur✅T10.1dispatched to the node as keyboard focus enters/leaves it
mouseover / mouseout🟡T1—hover state exists in CSS; JS events roadmap
wheel event🟡T2—mouse-wheel scrolling works natively; the JS wheel event — and preventDefault on it to block scrolling — is roadmap
scroll event🟡T2—not fired when a scroll container scrolls yet

Globals

APIStatusTierSinceNotes
standard ES built-ins (JSON, Math, Date, Promise, Array, Map, Set, RegExp)✅T00.1full ECMAScript, incl. async/await
console.log/warn/error/info✅T00.1
console.debug✅T20.3.4native engine aliases it to log; on the browser engine it’s the page’s own console
requestAnimationFrame / cancelAnimationFrame🟡T1—use setInterval for now
console.trace/table/group🟡T2—not installed on the native engine — calls throw TypeError; roadmap to stub for graceful degradation
setTimeout / setInterval / clearTimeout / clearInterval✅T10.1driven by Bevy’s clock
window (alias of globalThis)✅T10.1
window.innerWidth / innerHeight + resize🟡T2—viewport size not exposed yet
alert / confirm / prompt⛔——no modal UI; blocking dialogs don’t fit the frame loop
window.bevy.send(name, data)✅T10.1JS → ECS
window.bevy.on(name, cb)✅T10.1ECS → JS
window.bevy.query(path)🟡T2—async state read — Phase 2
history.pushState / replaceState / popstate / location🟡T3—in-memory routing state
fetch / XMLHttpRequest⛔——network; warn-and-reject stub only
localStorage / cookie⛔——out of scope (games persist via ECS)

Reserved globals

The Supersolid framework installs its own globals (documented on the Supersolid framework page). Authored code shares the global namespace with them, so don’t shadow these names:

KindReserved names
Reactive corecreateSignal, createEffect, createMemo, createRoot, createContext, useContext, onMount, onCleanup, untrack, batch
Render / control flowrender, Show, For, Index, Switch, Match
Framework namespace$ss (compiler-internal helpers)
Bridgewindow.bevy
PROJECTSUPERUI · BEVY UI
DRAWN BYSTROWK
SCALENOT TO SCALE
REVR1 · 0.1 EARLY BUILD
LICENCEMIT / APACHE-2.0