CSSOM
CSS Object Model (CSSOM) is the browser API that represents the CSS used by a document as a manipulable in-memory tree. It provides a structured interface for reading and modifying the stylesheets and their rules at runtime, separate from the rendering and layout processes. The CSSOM is used by scripts to inspect or alter CSS rules, enabling dynamic styling without reloading the page.
Core concepts and objects include the CSSStyleSheet, CSSRuleList, and CSSRule. The document exposes stylesheets via document.styleSheets,
Reading and writing through the CSSOM allows scripts to examine a stylesheet’s selectors and properties and
Security and cross-origin considerations apply: accessing the cssRules of a stylesheet loaded from a different origin