Modules for querying and manipulating the DOM, managing events, and responding to media queries.

Modules

Module Returns Deps Description
dnd object none SDE-internal Drag & Drop via Pointer Events
dom object secPolicy Selection, attributes, styles, scroll, focus (CSS filtering via secPolicy)
events object none Named events with lifecycle management
gesture object events Touch/pointer gestures: tap, swipe, pan, pinch
media object none Camera, microphone and screen streams (getUserMedia, getDisplayMedia), device registry
sound object none Short sound clips in memory: record from a microphone stream, trim / normalize, WAV bytes, play at any rate

Common pattern

const dom = runtime.resolve('dom');
const events = runtime.resolve('events');

// Selection + style
const btn = dom.query(container, 'button.submit');
dom.style(btn, 'color', 'red');

// Named event
events.on('btnClick', btn, 'click', (e) => console.log('clicked'));

// Cleanup
events.off('btnClick');