---
schema_version: "1"
id: 8fbb27d8064d1ccad5f53a6eaff41da06cfdc63078f227b53c76b48d9a30e17f
title: Modifying the DOM
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/js/js-dom-access.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/js-dom-access.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 5258a48b4993fee8d04045b5cc54c7115b268df85eea95f7bb7d040561b518d7
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# Modifying the DOM

The Document Object Model (DOM) is the language-independent model for representing and interacting with objects in HTML and XML documents. It’s important to know how to modify the DOM safely so that the framework’s rendering service doesn’t stomp on your changes and give you unexpected results.

-   **[Modifying DOM Elements Managed by](https://developer.salesforce.com/docs/platform/aura-platform/guide/js-dom-modify-framework.md)**  


    The framework creates and manages the DOM elements owned by a component. If you want to modify these DOM elements created by the framework, modify the DOM elements in the handler for the component’s `render` event or in a custom renderer. Otherwise, the framework will override your changes when the component is rerendered.

-   **[Modifying DOM Elements Managed by External Libraries](https://developer.salesforce.com/docs/platform/aura-platform/guide/js-dom-modify-external.md)**  


    You can use different libraries, such as a charting library, to create and manage DOM elements. You don’t have to modify these DOM elements within the `render` event handler or a renderer because they are managed by the external library.


