Lukas' Notes

web

Definition

Document Object Model (DOM)

The DOM is the tree-like, object-oriented representation of an HTML page maintained by the browser (living standard by WHATWG). Scripts interact with it through properties (document.forms, document.links, …) and methods (document.createElement, document.getElementsByTagName, …) to read and modify the page content.

The DOM is what JavaScript manipulates, and a script running on an origin gets full read/write access to that origin’s DOM — which is exactly what makes XSS dangerous.