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 | Status | Comment |
---|---|---|
HTML Living StandardThe definition of 'delegatesFocus' in that specification. | Living Standard |
Browser compatibility
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Chrome
Full support 57 |
Edge
Full support 79 |
Firefox
? |
IE
No support No |
Opera
? |
Safari
No support No |
WebView Android
Full support 57 |
Chrome Android
Full support 57 |
Firefox Android
? |
Opera Android
? |
Safari iOS
No support No |
Samsung Internet Android
Full support 7.0 |
Legend
- Full support
- Full support
- No support
- No support
- Compatibility unknown
- Compatibility unknown
- Experimental. Expect behavior to change in the future.'
- Experimental. Expect behavior to change in the future.
ShadowRoot.delegatesFocus by Mozilla Contributors is licensed under CC-BY-SA 2.5.