Made domappend work with object and wrote tests
Swapped domappend so you can't pass a parent element