patchElement updates an existing DOM element from an old and new element virtual node. It delegates attributes, CSS classes, styles, and event handlers to specialized patching functions; child nodes are handled separately. section 8.2.5
Core implementation shape
const el = oldVdom.el patchAttrs(el, oldAttrs, newAttrs) patchClasses(el, oldClass, newClass) patchStyles(el, oldStyle, newStyle) newVdom.listeners = patchEvents(el, oldListeners, oldEvents, newEvents)
Figure 8.13 Patching an element node
Use the flow diagram to follow element-node patching before examining each delegated operation. section 8.2.5
