How would I print a screen from an HTML5 game?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By TinkersEdge

I have created a game/quiz for an HTML5 export. Because the final screen shows the grade and time it took to complete, as well as which problems were incorrect, I would like people to be able to print out the final page as proof of their passing.

I have figured out how to make a screen shot of the final page. But wasn’t sure if that is what I should be doing. Online, if you just hit Print from the toolbar, it prints out the Godot viewport as just a big black box, so that is not an option. This is also what happens if I tell javascript to window.print(). So, not sure what the work around is so that it actually sees the viewport image.

Any help would be wonderful!

EDIT: OK, kept working with it, and the weird thing is, it prints the screen just fine in Chrome, but not in Safari or Firefox.