update DOM snippet