spawn_play_eval
Evaluate JavaScript in the play page's top frame to diagnose page-level issues like WebGPU support, network state, or document title. Does not access game UI inside its sandboxed iframe.
Instructions
Evaluate JavaScript in the play page's TOP frame (browser context — not the Spawn room api). Use it for page-level diagnostics: WebGPU support, network state, document title. It CANNOT see or click the game's UI: Spawn renders the UI in a cross-origin sandboxed iframe, so document.querySelector finds none of your ui.js buttons and reaching into the frame throws. Click game UI with spawn_play_input coordinates instead, and read live world state with spawn_exec.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | A JS EXPRESSION evaluated in the page's top frame (not a function body — a bare `return` is a syntax error). Wrap statements in an IIFE: (() => { ...; return x; })() |