mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-01 22:56:38 +00:00
24 lines
657 B
JavaScript
24 lines
657 B
JavaScript
import http from "node:http";
|
|
import { readPositiveIntEnv } from "../env-limits.mjs";
|
|
|
|
const port = readPositiveIntEnv("FIXTURE_PORT");
|
|
|
|
const html = `<!doctype html>
|
|
<html>
|
|
<body>
|
|
<main>
|
|
<button>Save</button>
|
|
<a href="https://docs.openclaw.ai/browser-cdp-live">Docs</a>
|
|
<div id="card" onclick="window.__clicked = true" style="cursor: pointer">Clickable Card</div>
|
|
<iframe title="Child" srcdoc='<button>Inside</button>'></iframe>
|
|
</main>
|
|
</body>
|
|
</html>`;
|
|
|
|
http
|
|
.createServer((_req, res) => {
|
|
res.writeHead(200, { "content-type": "text/html; charset=utf-8" });
|
|
res.end(html);
|
|
})
|
|
.listen(port, "127.0.0.1");
|