Can’t get onclick attr to work
in file public/index.html I use a div element with the onclick attribute to act as a button, but when I click on the button, nothing happens. It’s supposed to get rid of the button and the input element and then add a canvas element that covers the entire screen, but nothing happens. Anyone care to tell me what I’m doing wrong?
Update: I have found on the browser I’m using this warning:
[Violation] 'click' handler took <N>ms where is around 155 to 521. I don’t actually know if that’s any help, but yeah there you go.
- dont use onclick, use
- if you want a button, use a
Edit: it has been fixed, sorry about not marking you as the answer, I forgot but there you go. Ty!