browser.ts
2 documented symbols. Read the signatures first, then expand each item for parameters, return types, and examples.
Reference
interfaceOgBrowserSession extends AsyncDisposableA browser session that can render HTML pages to PNG. Implements AsyncDisposable…
A browser session that can render HTML pages to PNG. Implements AsyncDisposable for automatic cleanup via await using.
fnopenBrowser(): Promise<OgBrowserSession | null>Opens a Chromium browser and returns a session for rendering OG images. Returns…
Opens a Chromium browser and returns a session for rendering OG images. Returns null if Playwright/Chromium is not available. The session implements AsyncDisposable — use await using for automatic cleanup:
await using session = await openBrowser();
if (!session) return;
const png = await session.renderPage(html, 1200, 630);
Returns
Promise