I made a Proof of Concept for DWS (pascal to javascript compilation, as used in Smart Mobile Studio) some time ago: https://code.google.com/p/asmprofiler/source/browse/#svn%2Ftrunk%2F-Other-%2FRemoteDebuggerDWS
You can use my Indy 10 websocket (and socket.io!) components from here: https://github.com/andremussche/DelphiWebsockets