debug: add WriteDebugLog after postToIframe to confirm delivery
This commit is contained in:
@@ -28,9 +28,12 @@
|
||||
|
||||
// Post message to iframe (queue if not ready)
|
||||
function postToIframe(msg) {
|
||||
console.log('[CalendarPluginPage] postToIframe: iframeReady=' + iframeReady + ', hasEl=' + !!iframeEl + ', hasCW=' + !!(iframeEl?.contentWindow))
|
||||
if (iframeEl && iframeEl.contentWindow && iframeReady) {
|
||||
console.log('[CalendarPluginPage] postToIframe: sending msg.type=' + msg.type)
|
||||
iframeEl.contentWindow.postMessage(msg, '*')
|
||||
} else {
|
||||
console.log('[CalendarPluginPage] postToIframe: queuing msg.type=' + msg.type)
|
||||
messageQueue.push(msg)
|
||||
}
|
||||
}
|
||||
@@ -111,6 +114,8 @@
|
||||
events,
|
||||
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) {
|
||||
console.error('[CalendarPluginPage] loadCalendarData:', e)
|
||||
console.log('[CalendarPluginPage] error details:', JSON.stringify({message: String(e), stack: e?.stack}))
|
||||
|
||||
Reference in New Issue
Block a user