delegatesFocus 只读特性在 ShadowRoot interface returns a boolean that indicates whether delegatesFocus was set when the shadow was attached (see Element.attachShadow() ).

This is currently an experimental non-standard feature, available only in Chrome.

句法

var df = shadowRoot.delegatesFocus
					

A boolean value — true if the shadow root does delegate focus, false if it doesn't.

范例

let customElem = document.querySelector('my-shadow-dom-element');
let shadow = customElem.shadowRoot;
  ...
// Does it delegate focus?
let hostElem = shadow.delegatesFocus;
					

规范

This feature is not currently in a specification.

浏览器兼容性

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. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
delegatesFocus Chrome 57 Edge 79 Firefox ? IE No Opera ? Safari No WebView Android 57 Chrome Android 57 Firefox Android ? Opera Android ? Safari iOS No Samsung Internet Android 7.0

图例

完整支持

完整支持

不支持

不支持

兼容性未知 ?

兼容性未知

实验。期望将来行为有所改变。

实验。期望将来行为有所改变。

元数据

  • 最后修改: