debug: add WriteDebugLog inside iframe to confirm calendar-data delivery + log.Printf to WriteDebugLog

This commit is contained in:
2026-06-08 12:34:14 +08:00
parent c03e2e2961
commit f4a25128ae
2 changed files with 3 additions and 0 deletions
@@ -431,6 +431,7 @@ body {
switch (msg.type) {
case 'calendar-data':
try { window.parent.go.main.App.WriteDebugLog('[iframe] received calendar-data, events=' + (msg.events ? msg.events.length : 0) + ', categories=' + (msg.categories ? msg.categories.length : 0)); } catch(e) { try { console.log('iframe debug error: ' + e); } catch(e2) {} }
if (msg.events) state.events = msg.events;
if (msg.categories) state.categories = msg.categories;
state.eventsLoaded = true;