DOM as automatas