♻️ Refactor: Move 2 inline event handlers out of line

If MDN explicitly warns user not to use them, we probably shouldn't.

MDN also states: "Note that inline event handlers are blocked as well[...]You should replace them with addEventListener calls[...]" regarding CSP.
This commit is contained in:
Served Smart
2025-06-18 22:50:12 +02:00
parent a9aae948eb
commit a34947a630
5 changed files with 20 additions and 10 deletions

View File

@@ -1,8 +1,7 @@
<span>
<button
id="button_likes"
class="rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400"
onclick="process_article()">
class="rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400">
<span id="button_likes_heart" class="inline-block align-text-bottom hidden"
>{{ partial "icon.html" "heart" }}
</span>