Files
ElyOffice/tests/fixtures/web/probe.html
T
ZacharyZhang-NY b7fca0146d Ely Office: six offline-first desktop apps in Rust and GPUI
ElyDoc, ElyTable, ElyShow (LibreOfficeKit), ElyPDF (MuPDF), ElyTree (Git),
ElyMark (Milkdown and CodeMirror in CEF). ElyMail and ElyAgent follow.
2026-10-08 21:20:08 -04:00

33 lines
1.0 KiB
HTML

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<style>
body { background: var(--ely-bg); color: var(--ely-fg); margin: 0; }
textarea { width: 90%; height: 200px; }
</style>
</head>
<body>
<div id="marker" style="width: 300px; height: 150px; background: rgb(255, 0, 170)"></div>
<textarea id="text" aria-label="Text"></textarea>
<script src="../web-outside/evil.js"></script>
<script>
// The probe asks; the page answers through elyQuery.
window.report = (step) => window.elyQuery({
request: JSON.stringify({
step,
value: document.getElementById("text").value,
focused: document.activeElement && document.activeElement.id,
fg: getComputedStyle(document.documentElement).getPropertyValue("--ely-fg").trim(),
ratio: window.devicePixelRatio,
outside: Boolean(window.outsideRan),
rtc: typeof window.RTCPeerConnection,
}),
onSuccess: () => {},
onFailure: (code, message) => console.error("probe query failed", code, message),
});
document.getElementById("text").focus();
</script>
</body>
</html>