The problem I see is that many websites that rely heavily on JS have become pretty much applications rather than websites and as a result they heavily rely on a long running process. The way I understand this problem, this would rather require a long running browser process and (socket based) API exposed for external commands/apps to work with. But then again this would be not much different than Selenium or the likes. The API could be very different but the general principle (web browser process and an API for external applications to control it) would be the same.