@stadnik-petro
Posted
Hello!
It seems like there might be some issues with Firefox due to the click handler being invoked before registering in addEventListener(). Here's how you can fix it:
adviceBtn.addEventListener("click", getAdvice);
getAdvice();
Another aspect I want to draw your attention to is handling clicks on the img
tag instead of <div class="dice-img">
. This may lead to a situation where the user isn't clicking directly on the image, and the code won't work. I recommend paying attention to this point!