How to Shadow DOM Turn to Real DOM?

Recording and downloading and Static downloadThe built-in browser implements the disassembly and transformation of the Shadow DOM.

The shadow DOM eliminates the vulnerabilities inherent in building web applications. These vulnerabilities stem from the global nature of HTML, CSS, and JS. Over the years, we've invented numerous tools to circumvent these issues. For example, when you use a new HTML id/class, there's no guarantee it won't conflict with existing names used by the webpage. Subtle bugs can gradually emerge, CSS specificity can become a major problem (!important all of these!), style selectors can go haywire, and performance can be impacted. And there's much more.
Shadow DOM fixes CSS and the DOM. It introduces scoped styles to the web platform. Without tools or naming conventions, you can bind CSS with markup, hide implementation details, and write self-contained components in native JavaScript.
Shadow DOM is one of the three major standards for Web Components, the other two being HTML templates, Shadow DOM, and custom elements. HTML imports used to be on this list, but are now considered obsolete.
You don't need to write web components that use the shadow DOM. However, when you do, you can leverage its advantages (CSS scoping, DOM encapsulation, composition) and build reusable custom elements that are flexible, highly configurable, and extremely reusable. If custom elements are the way to create new HTML (using the JS API), the Shadow DOM is the way to provide its HTML and CSS. Using these two APIs together allows you to create components that contain self-contained HTML, CSS, and JavaScript.
Shadow DOM is a tool for building component-based applications.