Some checks are pending
CI / build-check-test (push) Waiting to run
- Add diagnostics.html page to test Lit event binding - Add SES protection script in index.html (runs before modules) - Force Vite dep optimization to prevent stale caches - Fixes for users with crypto wallet extensions (MetaMask etc.)
40 lines
No EOL
1.5 KiB
HTML
40 lines
No EOL
1.5 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Agent JAE</title>
|
|
<meta name="description" content="Agent JAE - AI Coding Agent by JaeSwift" />
|
|
<script>
|
|
// SES Lockdown Protection - prevents crypto wallet extensions
|
|
// (MetaMask, Phantom etc.) from breaking Lit event bindings.
|
|
// Must run BEFORE any module imports.
|
|
(function() {
|
|
try {
|
|
// Save critical prototypes before SES freezes them
|
|
var origDefineProperty = Object.defineProperty;
|
|
var origGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
var origAddEventListener = EventTarget.prototype.addEventListener;
|
|
var origRemoveEventListener = EventTarget.prototype.removeEventListener;
|
|
|
|
// Ensure Lit can still define properties on elements
|
|
if (Object.isFrozen && Object.isFrozen(EventTarget.prototype)) {
|
|
console.warn("[JAE] SES lockdown detected - applying event binding fix");
|
|
}
|
|
|
|
// Polyfill: ensure addEventListener is always available and unfrozen
|
|
window.__jae_addEventListener = origAddEventListener;
|
|
window.__jae_removeEventListener = origRemoveEventListener;
|
|
} catch(e) {
|
|
// Silent fail - normal when no SES present
|
|
}
|
|
})();
|
|
</script>
|
|
</head>
|
|
<body class="bg-background">
|
|
<div id="app"></div>
|
|
<script type="module" src="/src/main.ts"></script>
|
|
</body>
|
|
</html> |