The document was added as using javascript:
const task_edit_el = document.createElement("button");
task_edit_el.classList.add("edit");
task_edit_el.innerHTML = "Edit";
Now this creates a button element with the inner html Edit. how do i change the inner html to a font awesome icon? since its not showing on the normal html page. it is manipulated to mount when a button is clicked.
You need to create an "i" element inside in the button scope, after add class and finally add this i element to button element using add child.
<button><i class="fa-thin fa-alarm-clock"></i> Alarm</button>