if type is node, call onclone with node instead of document.