There probably needs to be a game clock (the usually implementation is hunger or enemies spawning).
Otherwise you can just go in a room and walk around till your back to full health.
I assume the author knows this.
HP regen was added as a fast&hacky way to make the game less difficult (non-regen versions were hard to beat).
(Also, you can F12 your JS console and hack the game's internals to your likings, adjusting your HP as necessary.)
For a non-PoC game, this would need to be more balanced.
There probably needs to be a game clock (the usually implementation is hunger or enemies spawning).
Otherwise you can just go in a room and walk around till your back to full health.
I assume the author knows this.