From 7e559585e850943bc51cdd0fc21e425257db0bcf Mon Sep 17 00:00:00 2001 From: Vula Builder Date: Sat, 1 Aug 2026 17:20:21 +0000 Subject: [PATCH] Deploy --- public/vula-sandbox-monitor.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 public/vula-sandbox-monitor.js diff --git a/public/vula-sandbox-monitor.js b/public/vula-sandbox-monitor.js new file mode 100644 index 0000000..c744038 --- /dev/null +++ b/public/vula-sandbox-monitor.js @@ -0,0 +1,8 @@ +(function(){ + window.addEventListener('error',function(e){ + try{if(window!==window.parent)window.parent.postMessage({type:'VULA_SANDBOX_ERROR',error:e.message||String(e),stack:e.error&&e.error.stack},'*')}catch(_){} + },true); + window.addEventListener('unhandledrejection',function(e){ + try{if(window!==window.parent){var m=e.reason instanceof Error?e.reason.message:String(e.reason);window.parent.postMessage({type:'VULA_SANDBOX_ERROR',error:m},'*')}}catch(_){} + }); +})(); \ No newline at end of file