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 Status Comment
DOM
The definition of 'delegatesFocus' in that specification.
Living Standard

Browser compatibility

BCD tables only load in the browser