I found that adding the event listeners via the element onclick attribute kinda is messy to work with at best. I just use eventlisteners:
const element = document.querySelector(".fa");
element.addEventListener("click", event => {
console.log("Do thing here");
})