As writing JavaScript code for a multiplayer game is a very advanced use case, the script API just gives you access to sending and receiving messages, and then you can write your own synchronization code on top of that. That's the approach used in Command & Construct.