Or he could use replit which did go to the trouble of implementing a web backend for the tk wm.
There's also a gtk backend for tk (gtkttk), as convoluted as that sounds, so presumably you could use gtk web implementations (broadway) behind that...
In any case, Tk doesn't require an OS to do window drawing, it's entirely up to how things are hooked up.
That doesn't render a web interface, it just bundles the platform specific executable so you can run scripts embedded in the web browser. Kinda like a hole in the web page into which an exe is shoved.
Also, no browser runs that stuff anymore, and it wouldn'tve been safe to run even when they did.
There's also a gtk backend for tk (gtkttk), as convoluted as that sounds, so presumably you could use gtk web implementations (broadway) behind that...
In any case, Tk doesn't require an OS to do window drawing, it's entirely up to how things are hooked up.