https://en.wikipedia.org/wiki/NeWSIt was one of the competitors to X back in the day. Basically all the window painting and client-side logic would be handled by an extended PostScript interpreter, which would receive and run the client code from the application, much like we do with HTML/CSS/JS today.