Skip to content

TermDOM 0.1.5

Latest

Choose a tag to compare

@brainkim brainkim released this 22 Aug 21:08

0.1.5

Added

  • CSS Grid: track sizing, placement and alignment in the layout engine; grid shorthand parsing and serialization; used track sizes resolved through the CSSOM.
  • Element scrolling: overflow containers clip, scrollTop/scrollLeft clamp against content extents and repaint, wheel events chain through nested scrollers, and scrollWidth/scrollHeight read off the layout tree.
  • The clipboard: ClipboardEvent and DataTransfer, a paste event with clipboard items and permissions, transfers emptied when their dispatch ends, and the clipboard gated on user activation.
  • Selection.modify(), with character, word and line granularities.
  • Sequential focus navigation follows HTML's scope model. The document, each shadow root and each slot form their own focus scope; a scope sorts by tabindex within itself and sits at its owner's position in the parent scope. delegatesFocus, slot fallback content, and negative-tabindex scopes (unreachable by Tab, navigable once focus is scripted inside) behave as specified. Tab past the last focusable rests on nothing, as past a browser's page.
  • user-select: none — the mouse cannot anchor or extend a selection into it, Selection.modify walks past it, and the painter lays no highlight over it. user-select: text re-enables selection inside a none ancestor.
  • aspect-ratio, with the ratio counted in cells.
  • The CSS system colors, mapped onto the terminal palette.
  • <details> gets a user-agent shadow tree: a closed details hides its body, bare text children included.
  • Number inputs edit like numbers: explicit grammar, input filtering, arrow stepping, and the valueAsNumber family.
  • Node.moveBefore — the atomic move primitive, with its validations, live-range and iterator bookkeeping, slot reassignment, and connectedMoveCallback (falling back to the disconnected/connected pair).
  • New event interfaces: MessageEvent, HashChangeEvent, StorageEvent, DragEvent, TextEvent, and a createEvent table covering the spec's list. The sensor and touch names throw, because they name hardware a terminal does not have.
  • Geometry and hit-testing surface: document.elementsFromPoint, checkVisibility, Range.createContextualFragment, Document.getElementsByName, and MouseEvent's page, offset and movement coordinate spaces.
  • IME composition: the terminal passes through the keys a composition is built from, shows the syllable while it is being composed, and delivers it whole.

Changed

  • <kbd> renders bold and underlined, the way TUIs have marked accelerators, replacing the bracketed rendering.
  • :focus, :focus-within and :host(:focus) are shadow-aware. The focused element and the shadow hosts above it match :focus; :focus-within climbs the ancestor-and-host chain; a focus change restyles that chain.
  • The width tables are generated from the Unicode Character Database.
  • event.isTrusted is honest: true for events the engine dispatched from real input, false for an author's.
  • initial in author styles resolves to the spec's initial value rather than the element default.
  • Documents without an engine behave per spec. A document from createHTMLDocument or DOMParser answers with zero geometry, state-only focus and rejecting fullscreen instead of throwing.

Fixed

  • A widget-heavy initial render dropped from 43 seconds to 374 milliseconds: a form widget's shadow <style> was rebuilding the document's whole cascade several times over. A shadow sheet now refreshes its own root, and initial render is linear in document size again.
  • focus() works inside shadow trees, document.activeElement retargets to the host chain, and ShadowRoot.activeElement answers with its own descendant.
  • Focus in fullscreen: size reveals by the screen, and blur runs before Escape exits.
  • requestAnimationFrame chains tick: a callback scheduling the next frame runs on that next frame, and awaiting a frame still means the frame that includes your pending mutations has landed.
  • A pseudo-element's used box metrics resolve from its own layout box.
  • grid-template-areas serializes as its cells, a single space apart.
  • An app that closes right after a frame no longer leaks cursor-position reports into the shell that inherits the terminal.
  • A document closing while fullscreen leaves no trace, the way an alt-screen program does: the screen restores to what stood before entry, with the shell continuing below it. Exiting fullscreen before closing still pays the final flow state out to scrollback.

Conformance

The WPT DOM suites run against the engine itself: each test file mounts as the initial document of a real TermDOM over a mock transport, with a testdriver backend that turns WebDriver key and click actions into the bytes a terminal sends. 95,064 subtests pass and 1,389 fail, with each excluded file naming its reason — see docs/dom-conformance.md and docs/cssom-conformance.md.


Release notes drafted by Claude (Fable 5).