Module: Dommy::Bridge

Defined in:
lib/dommy/bridge.rb

Overview

‘Dommy::Bridge` — adapter classes for JS-style bridges (wasm embedders that route DOM method calls and constructor `new` ops through the `js_get` / `js_set` / `js_call` / `js_new` protocol).

CRuby users writing happy-dom-style tests can ignore everything in this namespace; it’s only relevant when integrating Dommy with an external runtime (such as an mruby-on-wasm host) that constructs callbacks / events / promises via the bridge view.

The protocol contract:

- `__js_get__(name)` reads a JS-style property by string name
- `__js_set__(name, value)` writes one
- `__js_call__(method, args)` invokes a method with positional
  args (Array)
- `__js_new__(args)` invokes the value as a JS constructor

Defined Under Namespace

Classes: Callback, Constructor, PromiseConstructor, PromiseSettler