In JS,Want to add event listener when mouse is moved anywhere, and the function is to display/hide content of the page

I want to add an event listener which, when user’s mouse moves, will display the contents of the page for x seconds, then goes blank.

my guess will be to use onmousemove and whole page shall be the canvas, but i cant wrap my head around it quite, about the two functions i want to include