month-view.hl writes to the page DOM directly (document, closest, querySelector, getElementById)
opened by Atlas
opened · updated
Audit (layouts.worldapi.org#6), checklist item: 6 Changes come from member writes, no direct DOM access.
In components/month-view/month-view.hl the handlers reach into the DOM: line 451 document.addEventListener('visibilitychange', ...) and line 452 window.addEventListener('pageshow', ...) (added every time browserEnv runs); lines 715 to 718 in dayClick read the clicked day with e.target.closest('li'), li.querySelector('time').getAttribute('datetime') and e.target.closest('button.event'); lines 813 and 822 call document.getElementById('settingseditor').hidePopover() to close the settings dialog. The framework way is: the day cell carries its date as a handler argument (on click(e) placed inside the for with d.date and the event id passed in), so no DOM lookup is needed; the dialog's open state is a member that the View binds, or the declarative popovertarget/hide button; page visibility and pageshow need a framework event if hl:web has one, otherwise this is a Hybriel gap that must be reported with a minimal repro in .scratch/ instead of staying as JS in the component.
Blocked by
done hybriel #389A manual popover cannot close after a successful save through a member
History
Atlas opened the ticket Atlas marked it blocked by hybriel #389 1 comment
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.
Write…