aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/document/mozsyntheticdocument
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/api/document/mozsyntheticdocument')
-rw-r--r--files/zh-cn/web/api/document/mozsyntheticdocument/index.html38
1 files changed, 38 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/document/mozsyntheticdocument/index.html b/files/zh-cn/web/api/document/mozsyntheticdocument/index.html
new file mode 100644
index 0000000000..f8074cd687
--- /dev/null
+++ b/files/zh-cn/web/api/document/mozsyntheticdocument/index.html
@@ -0,0 +1,38 @@
+---
+title: Document.mozSyntheticDocument
+slug: Web/API/Document/mozSyntheticDocument
+tags:
+ - DOM
+translation_of: Web/API/Document/mozSyntheticDocument
+---
+<h2 id="概述">概述</h2>
+
+<p>{{ ApiRef("DOM") }}</p>
+
+<p>文档是否是合成文档; 即表示独立的图像,视频,音频等的文档。</p>
+
+<div class="note">
+<p>注:应考虑兼容性和应用场景</p>
+</div>
+
+<h2 id="Syntax" name="Syntax">语法</h2>
+
+<pre class="eval"><em>var isSynthetic</em> = <em>document</em>.mozSyntheticDocument;
+</pre>
+
+<p>返回时,如果文档是合成的,则合成是真实的; 否则是假的。</p>
+
+<h2 id="Example" name="Example">例子</h2>
+
+<p>如果您有一个您只想为合成文档显示的上下文菜单项(或相反,对于不合成的文档),这可能很有用。</p>
+
+<pre class="eval">var isSynthetic = document.mozSyntheticDocument;
+
+if (isSynthetic) {
+  /* insert your menu item here */
+}
+</pre>
+
+<h2 id="Specification" name="Specification">规范</h2>
+
+<p>不是任何规范的一部分。</p>