Page Proxy Bridge
Import
Section titled “Import”import { createPageProxyBridge } from "webotron/plugins/page-proxy-bridge";Entry Point
Section titled “Entry Point”createPageProxyBridge(view)
const bridge = await createPageProxyBridge(view);const model = await bridge.bridgeObject("({ count: 1, add(x) { this.count += x; return this.count; } })");
await model.add(2);const value = await model.count.$get();
await bridge.disposeAll();Main Operations
Section titled “Main Operations”| Operation | Purpose |
|---|---|
$get() | Read current value. |
$set(value) | Assign new value. |
$ref(kind?) | Create nested object/element ref. |
$dispose() | Release a specific bridge ref. |
disposeAll() | Release every bridge ref. |
What It Does
Section titled “What It Does”- Wraps page objects in callable proxy handles.
- Supports property access, method calls, nested refs, and disposal.
- Makes page-side state easier to inspect from host code.