Add onclone callback option to allow modifying cloned document prior to rendering