DOM API
Source: Document Object Model (DOM) - Web APIs | MDN
aka DOM, Document-Object-Model
Interface between JS code & HTML document render by Browser
API to contain methods & properties to (programmatically) interact with theDOM Tree
Data to rep structure & content of HTML docs as node & object
DOM Interface
ObjectInterface to expose portion of DOM API to Programming Language (ie JS)
DOM API not included in Node.js Runtime
The DOM was designed to be independent of any programming languages
DOM API can be accessed by any language including Python
DOM API provides a model to JavaScript for notion of what a Web Page and its components represent
DOM Tree
Tree-like structure of Node
, autogen by HTML document
DOM methods & properties are ordered by node types
DOM Traversal
(process) to walk through DOM API ; to select Element Node
relative to each other
EventTarget
Top-level Abstract Class Interface extends most objects with ability to receive Event
s or add Event Listener
window
Interface to rep Browser. Global Object to access most global properties & methods
References
DOM Interface
↔ ObjectInterface to expose portion of DOM API to Programming Language (ie JS)VDOM
↔ Intermediate Abstraction layer between Source Code & DOM API , data structure to mirror DOM API comprised ofFiber
(React Element)Diffing
↔ React HeuristicAlgorithm to reconcile change in state vs view & handle update to DOMDirty-Checking
↔ 💪 brute-force approach to detect DOM API changes by check EVERY node at regular intervalsDOM Traversal
↔ (process) to walk through DOM API ; to select ElementNode
relative to each otherjQuery
↔ Lib to simplify DOM API manipulation via$
wrapper around HTMLuseLayoutEffect()
↔ Hook variant ofuseEffect()
, to call Effect as soon as DOM API generated BEFORE UI repaints to DOM APIExternal System
↔ e.g. DOM API element, Global Object, fetch requestCommit Phase
↔ (process) to apply UI change to DOM API (in one Sync shot)useRef()
↔ Stateful Hook to persist Passive State Variable across renders in FC, asref
handle Escape Hatch to DOM API elementsUncontrolled Component
↔ Component with state manage by DOM API NOTReactDOM
Run [
Effect](effect) [
Sync](sync) before repaint [**_
DOM API_**](dom-api)
↔useLayoutEffect()
render()
↔ replace bycreateRoot()
.ReactDOM API
function to renderelement
to DOM API insidecontainer
- for Client Component onlyfindDOMNode()
↔ deprecatedReactDOM API
Escape Hatch to access DOM APINode
componentDidMount()
↔ CC Lifecycle Method to trigger when CC Mount to DOM APIcomponentWillUnmount()
↔ CC Lifecycle Method to trigger when CC Unmount from DOM APIEscape Hatch
↔ (mech) to express logic outside React model - to direct manipulate DOM