Skip to content

Commit

Permalink
Update title & lead-in & toc
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehoffms committed Sep 24, 2024
1 parent cef574b commit e37adfc
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 23 deletions.
2 changes: 1 addition & 1 deletion microsoft-edge/dev-videos/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ The **Detached Elements** tool helps you investigate and resolve DOM memory leak
Memory leaks occur when the JavaScript code of an application retains more and more objects in memory instead of releasing them for the browser to garbage-collect. We built the **Detached Elements** tool with the Microsoft Teams developers, and it has already helped us find and fix memory leaks across many of our own websites and apps.

See also:
* [Debug DOM memory leaks with the Detached Elements tool](../devtools-guide-chromium/memory-problems/dom-leaks.md)<!-- has Video section -->
* [Debug DOM memory leaks with the Detached Elements profiling type](../devtools-guide-chromium/memory-problems/dom-leaks.md)<!-- has Video section -->
* [Debug memory leaks with the Microsoft Edge Detached Elements tool](https://blogs.windows.com/msedgedev/2021/12/09/debug-memory-leaks-detached-elements-tool-devtools/) - blog post.


Expand Down
2 changes: 1 addition & 1 deletion microsoft-edge/devtools-guide-chromium/about-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Microsoft Edge DevTools includes the following tools.
| **Coverage** tool | Help you find unused JavaScript and CSS code, to speed up your page load and save your mobile users cellular data. | [Find unused JavaScript and CSS code with the Coverage tool](coverage/index.md) |
| **Crash analyzer** tool | Analyze crashes of your web app. You can input a JavaScript production stack trace, such as for non-fatal JavaScript exceptions, and then have your source maps applied to the stack trace so that you can debug faster. | [Crash analyzer tool](./crash-analyzer/index.md) |
| **CSS Overview** tool | Help you better understand your page's CSS and identify potential improvements. | [CSS Overview tool](css/css-overview-tool.md) |
| **Detached Elements** tool | To increase the performance of your page, this tool finds detached elements that the browser cannot garbage-collect, and identifies the JavaScript object that is still referencing the detached element. By changing your JavaScript to release the element, you reduce the number of detached elements on your page, increasing page performance and responsiveness. | [Debug DOM memory leaks with the Detached Elements tool](memory-problems/dom-leaks.md) |
| **Detached Elements** tool | To increase the performance of your page, this tool finds detached elements that the browser cannot garbage-collect, and identifies the JavaScript object that is still referencing the detached element. By changing your JavaScript to release the element, you reduce the number of detached elements on your page, increasing page performance and responsiveness. | [Debug DOM memory leaks with the Detached Elements profiling type](memory-problems/dom-leaks.md) |
| **Developer Resources** | Shows resource URLs for the webpage. | [Developer Resources tool](developer-resources/developer-resources.md) |
| **Device Emulation** | Use the **Device Emulation** tool, also called _Device Simulation Mode_ or _Device Mode_, to approximate how your page looks and responds on a mobile device. | [Emulate mobile devices (Device Emulation)](device-mode/index.md) |
| **Elements** tool | Inspect, edit, and debug your HTML and CSS. You can edit in the tool while displaying the changes live in the browser. Debug your HTML using the DOM tree, and inspect and work on the CSS for your webpage. | [Inspect, edit, and debug HTML and CSS with the Elements tool](elements-tool/elements-tool.md) |
Expand Down
2 changes: 1 addition & 1 deletion microsoft-edge/devtools-guide-chromium/landing/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ landingContent:
- text: Fix memory problems
url: ../memory-problems/index.md

- text: Debug DOM memory leaks with the Detached Elements tool
- text: Debug DOM memory leaks with the Detached Elements profiling type
url: ../memory-problems/dom-leaks.md

- text: Understand security issues using the Security tool
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Debug DOM memory leaks with the Detached Elements tool
title: Debug DOM memory leaks with the Detached Elements profiling type
description: Use the Detached Elements tool in the Microsoft Edge DevTools to find and fix DOM memory leaks.
author: MSEdgeTeam
ms.author: msedgedevrel
Expand All @@ -8,20 +8,16 @@ ms.service: microsoft-edge
ms.subservice: devtools
ms.date: 09/18/2023
---
# Debug DOM memory leaks with the Detached Elements tool
# Debug DOM memory leaks with the Detached Elements profiling type

<!-- todo: revise article to use Memory tool > Detached elements" profiling type instead of Detached Elements tool -->

> [!IMPORTANT]
> The **Detached Elements** tool is being deprecated. Starting with Microsoft Edge 130, the **Detached Elements** tool has a message stating that the tool is deprecated; instead, in the **Memory** tool, in the initial **Select profiling type** screen, select the **Detached elements** option button. The Edge-only Chrome DevTools Protocol (CDP) function `EdgeDOMMemory.getDetachedNodesIds` continues to work, but use `DOM.getDetachedDomNodes` instead.
>
> In Microsoft Edge 133, the **Detached Elements** tool will be removed; instead, in the **Memory** tool, in the initial **Select profiling type** screen, select the **Detached elements** option button. The CDP function `EdgeDOMMemory.getDetachedNodesIds` will be removed; use `DOM.getDetachedDomNodes` instead.
<!-- todo:
When the **Detached Elements** tool is removed, delete the present article, redirect to new url:
Add new article in Memory tool toc bucket: "Debug detached DOM element memory leaks with the Memory tool"
or possibly reuse present .md file / url; change title & content
-->

Use the **Detached Elements** tool to find detached elements that the browser cannot garbage-collect, and locate the JavaScript object that is still referencing the detached element. By changing your JavaScript to release the element, you reduce the number of detached elements on your page.
Use the **Detached elements** profiling type in the **Memory** tool to find detached elements that the browser cannot garbage-collect, and locate the JavaScript object that is still referencing the detached element. By changing your JavaScript to release the element, you reduce the number of detached elements on your page.

A memory leak can occur in your application when an element is no longer attached to the Document Object Model (DOM) tree, but is still referenced by some JavaScript running on the page. These elements are called *detached elements*. For the browser to garbage-collect (GC) the detached element, the element must not be referenced from the DOM tree or from JavaScript code.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Learn how to use Microsoft Edge and DevTools to find memory issues that affect p
* Identify detached DOM trees (a common cause of memory leaks) with **Heap snapshot**.
* Find out when new memory is being allocated in your JavaScript heap (JS heap) with **Allocation instrumentation on timeline**.

See also [Debug DOM memory leaks with the Detached Elements tool](dom-leaks.md).
See also [Debug DOM memory leaks with the Detached Elements profiling type](dom-leaks.md).


<!-- ====================================================================== -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ last sync'd April 16, 2024
|:---|:---|:---|:---|
| CSS mirroring sourcemaps | Used for [Update .css files from within the Styles tab (CSS mirror editing)](../../visual-studio-code/microsoft-edge-devtools-extension/css-mirror-editing-styles-tab.md) for the DevTools extension for Visual Studio Code. | [/css-mirroring-sourcemaps-demo/](https://github.com/MicrosoftEdge/Demos/tree/main/css-mirroring-sourcemaps-demo) | n/a |
| TODO app | Simple To Do app with vanilla JavaScript. Used for screenshots in the [Microsoft Edge DevTools documentation](/microsoft-edge/devtools-guide-chromium/landing/), and for [Opening DevTools and the DevTools browser](../../visual-studio-code/microsoft-edge-devtools-extension/open-devtools-and-embedded-browser.md) for the DevTools extension for Visual Studio Code. | [/demo-to-do/](https://github.com/MicrosoftEdge/Demos/tree/main/demo-to-do) | [My tasks](https://microsoftedge.github.io/Demos/demo-to-do/) |
| Detached elements | Chat-like demo. Used for [Debug DOM memory leaks with the Detached Elements tool](../memory-problems/dom-leaks.md). | [/detached-elements/](https://github.com/MicrosoftEdge/Demos/tree/main/detached-elements) | [Simulate traffic](https://microsoftedge.github.io/Demos/detached-elements/) |
| Detached elements | Chat-like demo. Used for [Debug DOM memory leaks with the Detached Elements profiling type](../memory-problems/dom-leaks.md). | [/detached-elements/](https://github.com/MicrosoftEdge/Demos/tree/main/detached-elements) | [Simulate traffic](https://microsoftedge.github.io/Demos/detached-elements/) |
| 3D View | Used for [Navigate webpage layers, z-index, and DOM using the 3D View tool](../3d-view/index.md). | [/devtools-3d/](https://github.com/MicrosoftEdge/Demos/tree/main/devtools-3d) | [Microsoft Edge DevTools 3D View tool demo](https://microsoftedge.github.io/Demos/devtools-3d/) |
| Accessibility testing | Used for [Accessibility-testing features](../accessibility/reference.md). | [/devtools-a11y-testing/](https://github.com/MicrosoftEdge/Demos/tree/main/devtools-a11y-testing) | [Animal shelter](https://microsoftedge.github.io/Demos/devtools-a11y-testing/) |
| DevTools issue: animating a CSS property that requires layout | Illustrates the **Issues** and **Elements** tools warning when CSS properties that require layout are animated. | [/devtools-animated-property-issue/](https://github.com/MicrosoftEdge/Demos/tree/main/devtools-animated-property-issue) | [Animated CSS property demo](https://microsoftedge.github.io/Demos/devtools-animated-property-issue/) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The new **Detached Elements** tool finds all of the detached elements on your pa
Update: This feature has been released and is no longer experimental.<!-- To turn on this experiment, go to **Settings** > **Experiments** and select the checkbox next to **Detached Elements**. -->

See also:
* [Debug DOM memory leaks with the Detached Elements tool](../../../memory-problems/dom-leaks.md)
* [Debug DOM memory leaks with the Detached Elements profiling type](../../../memory-problems/dom-leaks.md)


<!-- ====================================================================== -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The **Detached Elements** tool was initially available as an experiment in [Micr
![The Detached Elements tool](./devtools-images/detached-elements-tool.png)

See also:
* [Debug DOM memory leaks with the Detached Elements tool](../../../memory-problems/dom-leaks.md)
* [Debug DOM memory leaks with the Detached Elements profiling type](../../../memory-problems/dom-leaks.md)
* [Debug memory leaks with the Microsoft Edge Detached Elements tool - YouTube](https://www.youtube.com/watch?v=v2iy17ptmBk&ab_channel=MicrosoftEdge)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ In previous versions of Microsoft Edge, when selecting the table of detached ele
![Detached Elements List, Table, 5 rows, 3 columns](./devtools-104-images/a11y-detached-elements.png)

See also:
* [Debug DOM memory leaks with the Detached Elements tool](../../../memory-problems/dom-leaks.md)
* [Debug DOM memory leaks with the Detached Elements profiling type](../../../memory-problems/dom-leaks.md)
* [Navigate DevTools with assistive technology](../../../accessibility/navigation.md)


Expand Down
10 changes: 4 additions & 6 deletions microsoft-edge/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -493,12 +493,6 @@
- name: Optimize CSS styles with the CSS Overview tool
href: devtools-guide-chromium/css/css-overview-tool.md
displayName: CSS Overview tool
# Detached Elements tool ------------------------------------------------------
- name: Detached Elements tool
items:
- name: Debug DOM memory leaks with the Detached Elements tool # added article
href: devtools-guide-chromium/memory-problems/dom-leaks.md
displayName: Detached Elements tool
# Developer Resources tool ----------------------------------------------------
- name: Developer Resources tool
items:
Expand Down Expand Up @@ -544,6 +538,10 @@
href: devtools-guide-chromium/memory-problems/heap-snapshots.md
displayName: Memory tool

- name: Debug DOM memory leaks with the Detached Elements profiling type
href: devtools-guide-chromium/memory-problems/dom-leaks.md
displayName: Debug DOM memory leaks with the Detached Elements profiling type # old title

- name: Use Allocation instrumentation on timeline
href: devtools-guide-chromium/memory-problems/allocation-profiler.md
displayName: Memory tool
Expand Down

0 comments on commit e37adfc

Please sign in to comment.