Add full subdoc support to Javascript client

Is this right?