aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/shadowroot/delegatesfocus
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/shadowroot/delegatesfocus
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/api/shadowroot/delegatesfocus')
-rw-r--r--files/zh-cn/web/api/shadowroot/delegatesfocus/index.html38
1 files changed, 38 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/shadowroot/delegatesfocus/index.html b/files/zh-cn/web/api/shadowroot/delegatesfocus/index.html
new file mode 100644
index 0000000000..62073edb52
--- /dev/null
+++ b/files/zh-cn/web/api/shadowroot/delegatesfocus/index.html
@@ -0,0 +1,38 @@
+---
+title: ShadowRoot.delegatesFocus
+slug: Web/API/ShadowRoot/delegatesFocus
+translation_of: Web/API/ShadowRoot/delegatesFocus
+---
+<div>{{APIRef("Shadow DOM")}}</div>
+
+<p>{{domxref("ShadowRoot")}} 接口中的只读属性 <strong><code>delegatesFocus</code></strong> 返回一个布尔值表明 delegatesFocus是否在shadow被附加的时候设置了。</p>
+
+<p>这目前是一个实验的非标准特性,仅在Chrome中可用。</p>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox">var <var>df</var> = <var>shadowRoot</var>.delegatesFocus</pre>
+
+<h3 id="值">值</h3>
+
+<p>一个布尔值 — <code>true</code> 值表明shadow root已经delegate focus, <code>false</code> 反之.</p>
+
+<h2 id="示例">示例</h2>
+
+<pre class="brush: js">let customElem = document.querySelector('my-shadow-dom-element');
+let shadow = customElem.shadowRoot;
+
+ ...
+
+// Does it delegate focus?
+let hostElem = shadow.delegatesFocus;</pre>
+
+<h2 id="标准">标准</h2>
+
+<p>这目前是个非标准特性。</p>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+
+
+<p>{{Compat("api.ShadowRoot.delegatesFocus")}}</p>