Generalized dom renderer