mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-20 19:02:10 +00:00
Restructuring and refactoring
This commit is contained in:
parent
3331701e7e
commit
79dd23b6da
31 changed files with 1088 additions and 1686 deletions
12
packages/browser-extension/static/sandbox.js
Normal file
12
packages/browser-extension/static/sandbox.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
// Minimal sandbox.js - just listens for sandbox-load and writes the content
|
||||
window.addEventListener("message", (event) => {
|
||||
if (event.data.type === "sandbox-load") {
|
||||
// Write the complete HTML (which includes runtime + user code)
|
||||
document.open();
|
||||
document.write(event.data.code);
|
||||
document.close();
|
||||
}
|
||||
});
|
||||
|
||||
// Signal ready to parent
|
||||
window.parent.postMessage({ type: "sandbox-ready" }, "*");
|
||||
Loading…
Add table
Add a link
Reference in a new issue