The DOM as a Persistent Data Structure