add dom example and implement some dom methods