Not only is this possible, there's actually a bunch!
Unity has a WebGL player, but I guess Unity is dead now.
Other WebGL projects are the Quake 1 and Quake 3 Arena games ported to the web:
https://www.netquake.io/
https://openarena.live/
PlayCanvas is a commercial offering: https://playcanvas.com/explore
There's also a bunch of open-source Javascript game engines: https://github.com/collections/javascript-game-engines
Of those, BabylonJS seems pretty powerful for 3D: https://www.babylonjs.com/games/
Or PixiJS for 2D: https://pixijs.com/
Lastly, there's also my personal preference... game streaming via GeForce Now (https://www.nvidia.com/en-us/geforce-now/) or Luna (https://www.amazon.com/luna/landing-page) or Boosteroid (https://boosteroid.com/). They're like Stadia, but actually alive, and GFN in particular works really, really well. Way better than trying to render graphics locally on my Mac (the RTX 4080 is way more powerful than even the M2 Ultra, and cloud streaming means no heat or noise or battery consumption locally). I hope that, not clientside WebGL/JS, becomes the future of web gaming.