ShadowRoot.delegatesFocus
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.
ShadowRoot
接口中的只读属性 delegatesFocus
返回一个布尔值表明 delegatesFocus 是否在 shadow 被附加的时候设置了。
这目前是一个实验的非标准特性,仅在 Chrome 中可用。
语法
var df = shadowRoot.delegatesFocus
值
一个布尔值 — true
值表明 shadow root 已经 delegate focus, false
反之。
示例
js
let customElem = document.querySelector('my-shadow-dom-element');
let shadow = customElem.shadowRoot;
...
// Does it delegate focus?
let hostElem = shadow.delegatesFocus;
标准
这目前是个非标准特性。
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
delegatesFocus |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on 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.