website: redesign part 8

This commit is contained in:
nym21
2026-06-05 18:12:46 +02:00
parent ff2c04a100
commit b00692249c
17 changed files with 241 additions and 201 deletions
+16
View File
@@ -0,0 +1,16 @@
/**
* @param {Event} event
* @param {string} selector
*/
export function getEventTarget(event, selector) {
return /** @type {HTMLElement | null} */ (
/** @type {HTMLElement} */ (event.target).closest(selector)
);
}
/** @param {Event} event */
export function getEventAnchor(event) {
return /** @type {HTMLAnchorElement | null} */ (
getEventTarget(event, "a[href]")
);
}