MCPcopy Create free account
hub / github.com/anomalyco/opencode / getViewerHost

Function getViewerHost

packages/session-ui/src/pierre/file-runtime.ts:15–20  ·  view source on GitHub ↗
(container: HTMLElement | undefined)

Source from the content-addressed store, hash-verified

13}
14
15export function getViewerHost(container: HTMLElement | undefined) {
16 if (!container) return
17 const host = container.querySelector("diffs-container")
18 if (!(host instanceof HTMLElement)) return
19 return host
20}
21
22export function getViewerRoot(container: HTMLElement | undefined) {
23 return getViewerHost(container)?.shadowRoot ?? undefined

Callers 2

getHostFunction · 0.90
getViewerRootFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected