implement doc with js on top of group
a sensible, complete implementation for GroupContents merging