From 03375ef22f4ff43607a3dc4e9c585f7e79c0b3d8 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Wed, 29 Apr 2026 17:53:48 -0400 Subject: [PATCH] Remove all inline event handlers; replace with data-action delegation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - inspector.html: onclick on port blocks, close button, run-diagnostic button, and diag-toggle sections all converted to data-action attributes; single delegated click listener handles all cases + Escape key closes panel - links.html: onclick on panel title headers, Collapse All, Expand All converted to data-action with delegated listener - suppressions.html: onsubmit/onchange wired via addEventListener at init - index.html: onsubmit/onchange on suppress modal form wired at init No behavioural changes — pure event-handling refactor for TDS compliance. Co-Authored-By: Claude Sonnet 4.6 --- templates/index.html | 6 ++++-- templates/inspector.html | 28 +++++++++++++++++++++------- templates/links.html | 16 ++++++++++++---- templates/suppressions.html | 7 +++++-- 4 files changed, 42 insertions(+), 15 deletions(-) diff --git a/templates/index.html b/templates/index.html index 3f7a40f..4fd9d19 100644 --- a/templates/index.html +++ b/templates/index.html @@ -399,11 +399,11 @@

Suppress Alert

-
+
- @@ -449,6 +449,8 @@ {% block scripts %} {% endblock %} diff --git a/templates/suppressions.html b/templates/suppressions.html index 59a7af7..a77df40 100644 --- a/templates/suppressions.html +++ b/templates/suppressions.html @@ -15,11 +15,11 @@
- +
- @@ -294,6 +294,9 @@ } } + document.getElementById('s-type')?.addEventListener('change', onTypeChange); + document.getElementById('create-suppression-form')?.addEventListener('submit', createSuppression); + document.addEventListener('click', e => { const pill = e.target.closest('#create-suppression-form .pill[data-duration]'); if (pill) {