Add an API to duplicate a dom string