The Document Object Model, or DOM, is the live browser tree that represents a web page as structured nodes for text, forms, buttons, frames, and other elements. Unlike the original HTML source, the DOM can change after the page loads because JavaScript can add, remove, hide, or rewrite elements in real time.
The DOM matters in cyber security because many phishing and malware pages rely on post-load changes to mislead users or scanners. A page may look harmless at first, then swap in a fake login form, reveal a redirect, or load a malicious iframe only after scripts execute. Defenders inspect DOM changes during runtime to catch this behavior, since static scans or screenshots may miss the real page state.


