debug: add WriteDebugLog after postToIframe to confirm delivery
This commit is contained in:
parent
f892d377a0
commit
c03e2e2961
File diff suppressed because one or more lines are too long
|
|
@ -19,7 +19,7 @@
|
||||||
background: #13131f;
|
background: #13131f;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script type="module" crossorigin src="/assets/main-C0ZuLxdW.js"></script>
|
<script type="module" crossorigin src="/assets/main-Bj0X1nRJ.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/main-B1PBee3I.css">
|
<link rel="stylesheet" crossorigin href="/assets/main-B1PBee3I.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
||||||
|
|
@ -28,9 +28,12 @@
|
||||||
|
|
||||||
// Post message to iframe (queue if not ready)
|
// Post message to iframe (queue if not ready)
|
||||||
function postToIframe(msg) {
|
function postToIframe(msg) {
|
||||||
|
console.log('[CalendarPluginPage] postToIframe: iframeReady=' + iframeReady + ', hasEl=' + !!iframeEl + ', hasCW=' + !!(iframeEl?.contentWindow))
|
||||||
if (iframeEl && iframeEl.contentWindow && iframeReady) {
|
if (iframeEl && iframeEl.contentWindow && iframeReady) {
|
||||||
|
console.log('[CalendarPluginPage] postToIframe: sending msg.type=' + msg.type)
|
||||||
iframeEl.contentWindow.postMessage(msg, '*')
|
iframeEl.contentWindow.postMessage(msg, '*')
|
||||||
} else {
|
} else {
|
||||||
|
console.log('[CalendarPluginPage] postToIframe: queuing msg.type=' + msg.type)
|
||||||
messageQueue.push(msg)
|
messageQueue.push(msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -111,6 +114,8 @@
|
||||||
events,
|
events,
|
||||||
categories,
|
categories,
|
||||||
})
|
})
|
||||||
|
// Confirm delivery via Go log
|
||||||
|
try { window.go.main.App.WriteDebugLog('[CalendarPluginPage] calendar-data sent to iframe, events=' + events.length + ', categories=' + (categories?.length || 0)) } catch(e) {}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('[CalendarPluginPage] loadCalendarData:', e)
|
console.error('[CalendarPluginPage] loadCalendarData:', e)
|
||||||
console.log('[CalendarPluginPage] error details:', JSON.stringify({message: String(e), stack: e?.stack}))
|
console.log('[CalendarPluginPage] error details:', JSON.stringify({message: String(e), stack: e?.stack}))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue