{"modulePath":"github.com/memcode-ai/memcode","version":"v0.56.16","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package browserrender\n\nPackage browserrender is memcode's OPTIONAL local browser-render capability: the last-resort fetch tier for JavaScript-rendered pages that raw GET and the server-side web\\_fetch (both no-JS) cannot read. It is NOT bundled — it drives a Chrome/Chromium already on the machine via headless --dump-dom (no Node, no new dependency). A managed, on-demand-downloaded browser can be added later under ~/.memcode/tools/browser-render without changing callers.\n\nRendering executes the page's JavaScript locally, so callers MUST gate it behind explicit user consent — use only for pages the user trusts.\n\n## Functions\n\n```go\nfunc Available() bool\n```\nAvailable reports whether a browser renderer is usable right now.\n\n```go\nfunc Find() (string, bool)\n```\nFind returns the path to a usable Chrome/Chromium and whether one was found. It checks a managed install first, then PATH, then the OS's standard locations.\n\n```go\nfunc ManagedDir() string\n```\nManagedDir is where an on-demand-installed browser would live (future installer).\n\n```go\nfunc Render(ctx context.Context, url string) (string, error)\n```\nRender loads url in headless Chrome via the DevTools protocol — executing the page's JavaScript and WAITING for the client render to settle — and returns the rendered DOM HTML. (A plain \\`--dump-dom\\` captures the empty shell before SPA content loads, so we drive it properly with chromedp.) The caller must obtain user consent first, since this runs arbitrary page JS locally.\n\n","path":"github.com/memcode-ai/memcode/internal/browserrender","name":"browserrender","synopsis":"Package browserrender is memcode's OPTIONAL local browser-render capability: the last-resort fetch tier for JavaScript-rendered pages that raw GET and the server-side web_fetch (both no-JS) cannot read.","isRedistributable":true}
