I made an extension that changes messes with the google calculator, but i am unable to edit the value of an element inside an Event Listener.
//the value of the calculator:
let output = document.getElementById("cwos")
//the equals/calculate button:
const equals = document.querySelector("div[jsname='Pt8tGc']")
//this edits the calculators value:
output.textContent = 0
console.log(output.textContent)
equals.addEventListener("click", function() {
console.log("clicked")
//this doesn't edit the calculators value, and i don't know why
output.textContent = 0
console.log(output.textContent)
})
Thanks if you can answer.