TrayPage Docs

HTML capabilities

Browser features TrayPage HTML can use, and authoring notes.

HTML posted to TrayPage opens as a page in the viewer's browser. Pages can use external APIs, embeds, forms, and rich browser features, so AI-generated interactive HTML can be shared as-is.

Markdown pages are converted to HTML server-side by TrayPage, so these details rarely matter for Markdown authors. The following mainly applies when you ask an AI agent to generate HTML pages.

Available Features

  • JavaScript / CSS — Inline scripts and styles run. eval and WebAssembly are available.
  • CDN libraries — Load from external CDNs with <script src="https://..."> / <link href="https://...">. Chart.js, Tailwind CSS (Play CDN), Mermaid, D3, and similar libraries can be used.
  • External API access — Pages can connect to HTTPS / WSS services with fetch, XHR, sendBeacon, WebSocket, and similar APIs. For fetch and XHR, the external service must allow browser access with CORS headers.
  • Third-party embeds — Pages can embed videos, maps, design previews, demos, and other content with <iframe>. The embedded service can still block framing with its own policy.
  • Form submission — Inputs, validation, JavaScript submit handlers, and native form submission to HTTPS endpoints are available.
  • Fonts, images, video, audio — Web fonts, HTTPS-served images/video/audio, and data: / blob: URLs are available.
  • Graphics and interaction — Canvas / SVG / WebGL, animations, and Web Workers via blob URLs are available.
  • Links, popups, dialogs, and downloads — Links, new tabs, alert / confirm / prompt, plus file saving via <a download> or blob URLs can be used.

Unavailable Features

The following features are unavailable due to technical constraints. For state that must survive reloads, use URLs, an external API, or downloadable files.

  • Browser-managed persistent storagelocalStorage / sessionStorage / IndexedDB / cookies are unavailable.
  • Offline support and browser cache control — Service Worker / Cache API are unavailable.

Prompting AI Agents

If you install the TrayPage agent skill, the detailed runtime assumptions are provided to the AI agent by the skill. See MCP / Skill for setup.

For a one-off instruction, the AI agent can use the external APIs, embeds, and form endpoints the page needs. For APIs that the page reads with fetch or XHR, choose endpoints that support browser CORS. Do not assume browser-managed persistent storage is available.

Create a single-file HTML page for TrayPage. External APIs, HTTPS iframe embeds, and form submission are allowed. Use browser-readable API endpoints that support CORS. Do not rely on localStorage, IndexedDB, or Service Worker; if persistent state is needed, use an external API, URL state, or a downloadable file.

On this page