If you're implementing a websocket client outside a browser, there is no need for you to follow that API spec. Feel free to invent any API that works well for the language that you're targeting.<p>We have spent too much time in the past going down the "one API that can be implemented in any language" design path in the web space and it hasn't worked out well. The DOM is a pretty egregious example of this; parts of it are clearly designed to work in any language as long as it can look sufficiently like java. The result is it sucks everywhere (including java, I expect, although I can't say I have tried). It's not a coincidence that python programmers now use ElementTree rather than DOM, or that javascript programmers now use jQuery; these libraries have APIs written to the language's strengths.<p>Today when we invent new web APIs we try to make them feel natural in javascript because that's the language that web browsers run. That's hard enough without simultaneously trying to make them good fits for PHP, Haskell and Clojure.