const f = document.querySelector('iframe.editframe'); const w = f.contentWindow; const out={}; out.keys = Object.keys(w).filter(k=>!/^(webkit|on|chrome)/.test(k)).slice(0,80); try { const b = w.MSG_BUS_PCB; out.busType = Object.prototype.toString.call(b); out.busKeys = b ? Object.keys(b).slice(0,30) : null; if (b) { const proto = Object.getPrototypeOf(b); out.busProto = Object.getOwnPropertyNames(proto).slice(0,30); } } catch(e){ out.busErr=String(e).slice(0,120); } out.scripts = Array.from(w.document.querySelectorAll('script')).map(s=>String(s.src).slice(0,140)).filter(Boolean); return out;