MDN wants to learn about developers like you:

The host read-only property of the ShadowRoot returns a reference to the DOM element the ShadowRoot is attached to.


var element =


A  DOM Element.


let customElem = document.querySelector('my-shadow-dom-element');
let shadow = customElem.shadowRoot;


// return the original host element sometime later
let hostElem =;


Specification Status Comment
The definition of '' in that specification.
Living Standard  

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 53 ? ? ? 40 10
Feature Android Edge Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support 53 ? ? ? 40 10.1

Document Tags and Contributors

 Contributors to this page: chrisdavidmills, fscholz, sideshowbarker, arthurevans, jpmedley
 Last updated by: chrisdavidmills,