attachToDOM
attachToDOM(
driver,host,opts?): () =>void
Defined in: src/driver/web/dom.ts:159
Wire a WebDriver to a DOM element: frames render as HTML inside it,
and its keyboard/mouse/paste events drive the app. Returns a detach
function. Browser-only — requires document.
Throws if called twice on the same host without detaching first — a second
attach would register a duplicate listener set (split-brain input dispatch)
and silently clobber the first driver’s onFrame.
Parameters
Section titled “Parameters”driver
Section titled “driver”HTMLElement
AttachOptions = {}
Returns
Section titled “Returns”() => void