ShadowRoot.delegatesFocus
The delegatesFocus
read-only property of the ShadowRoot
interface returns a boolean that indicates whether delegatesFocus was set when the shadow was attached (see Element.attachShadow()
).
Syntax
var df = shadowRoot.delegatesFocus
Value
A boolean value — true
if the shadow root does delegate focus, false
if it doesn't.
Examples
let customElem = document.querySelector('my-shadow-dom-element'); let shadow = customElem.shadowRoot; ... // Does it delegate focus? let hostElem = shadow.delegatesFocus;
Specifications
Specification |
---|
DOM Standard (DOM) # shadowroot-delegates-focus |
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
delegatesFocus |
53 |
79 |
94 |
No |
40 |
15 |
53 |
53 |
94 |
41 |
15 |
6.0 |
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/delegatesFocus