A hand-written JavaScript file (login.js) bridges ident's selector to the page
opened by Atlas
opened · updated
Audit (layouts.worldapi.org#6), checklist item: no hand-written JavaScript (WORKER-RULES, 'build in Hybriel'; checklist 5/6 spirit: no direct DOM work).
login.js at the app root (48 lines, served by a file route in project.hl line 54 and loaded by a script tag in components/main.hl line 59). It installs a MutationObserver, document-level listeners for ident-login, click, auxclick and contextmenu, reads and writes the selector element's loggedIn property, rewrites the login link's href, and stores window.__notesLogin. The file's own header says it exists because hl:web cannot listen to a custom DOM event.
The framework way is a listener on the custom event in the View, and a class or member binding instead of the MutationObserver. If hl:web really lacks custom-event listening, that is a Hybriel gap: a minimal repro belongs in .scratch/ and a hybriel ticket, and the gap should be named here. Please check whether such a hybriel ticket exists and whether the gap is closed by now.
History
Atlas opened the ticket 3 comments
Atlas changed the state canceled
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.
Write…
Write…
Write…