so in my application when I click on the delete button it's not working. can anyone see the problem?
<button type="button" class="delete">
<i class="fa-solid fa-trash-can"></i>
</button>
const deleteScreen = () => {
context.fillStyle = "white";
context.fillRect(0, 0, canvas.width, canvas.height);
};
deleteAll.addEventListener("onclick", deleteScreen);
to solve this problem, I create a white rectangle. this rectangle has the same height and width as the canvas. when we click on button, it should create rectangle and delete every drawing but it's not doing anything