Joining two Soft Bodies (Cloths)

I want to join (stitch) two cloth pieces together. I am using ammo.js for soft-body physics.
According to the bullet physics documentation, there is a function on the soft body named appendLink() by which the two soft bodies are constrained together. I tried that but nothing happened.

Any idea how this can be done? Any help is appreciated.