DOM based drawing application