Execute JavaScript code in isolated environment
JavaScript code to execute
Variables and functions to inject
Execution timeout in milliseconds
Promise with execution result
OptionalsetupSetup real-time event stream listener (optional) Only implemented by sandboxes that support real-time streaming (e.g., IframeSandbox) NodeSandbox uses synchronous execution and doesn't implement this.
Callback to receive real-time log/event messages
Cleanup function to remove the listener
Sandbox executor interface - must be implemented by platform-specific sandboxes