From d80cb4766155a5392b112756af3a64ae11604a10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sat, 11 Jun 2022 23:44:14 +0200 Subject: Move clock component initialization to procedure. When the document was renederd as HTML the connectedCallback:s were ran before the document was there, meaning that the initial content of the tags were missing. This gives us controll over when its ran, and here also ensures that it's ran once the document is there. --- static/script.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'static/script.ts') diff --git a/static/script.ts b/static/script.ts index 650a5aa0..ec771773 100644 --- a/static/script.ts +++ b/static/script.ts @@ -1,5 +1,8 @@ import { VEvent, xml_to_vcal } from './vevent' -import { SmallcalCellHighlight, Timebar } from './clock' +import { + SmallcalCellHighlight, Timebar, + initialize_clock_components +} from './clock' import { vcal_objects, event_calendar_mapping } from './globals' import { EventCreator } from './event-creator' import { PopupElement, setup_popup_element } from './components/popup-element' @@ -40,6 +43,7 @@ window.addEventListener('load', function() { } } + initialize_clock_components(); initialize_components(); /* A full redraw here is WAY to slow */ -- cgit v1.2.3