Moved dom interactions out of parser