refactor: simplify contact form timestamp with hyperscript + minimal JS
Replace 34-line IIFE/MutationObserver with: - Hyperscript: on toggle if me.open call resetContactForm() - 11-line resetContactForm() function Also dispatches 'show' event from openModal() for ninja-keys integration. All 7 contact form tests pass.
This commit is contained in:
@@ -48,6 +48,8 @@
|
||||
const modal = document.getElementById(modalId);
|
||||
if (modal && modal.showModal) {
|
||||
modal.showModal();
|
||||
// Dispatch 'show' event for hyperscript handlers
|
||||
modal.dispatchEvent(new CustomEvent('show'));
|
||||
}
|
||||
ninjaKeys.close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user