H5P can't display alerts
I just created a new H5P project for Moodle. This project displays a console.log message and an alert message (both lines of code are one after the other). Those lines are supposed to work as soon as the page loads. The console.log works but the alert doesn't.
When I upload this code to Moodle, the console.log message shows, but there is no pop-up screen showing my alert message.
Can't Moodle show alert messages? Should I do something special? Is it my fault or is it that Moodle doesn't display alert messages??