Skip to content

Commit 47858e4

Browse files
author
正霖
committed
Update: translate to 9.2
1 parent 028b80d commit 47858e4

File tree

1 file changed

+22
-29
lines changed

1 file changed

+22
-29
lines changed

Diff for: spec-zh/imports/index.html

+22-29
Original file line numberDiff line numberDiff line change
@@ -420,70 +420,63 @@ <h3 id="imports-and-csp">导入和内容安全策略</h3>
420420
例如,如果发送 <a href="http://w3c.github.io/webappsec/specs/content-security-policy/csp-specification.dev.html#content-security-policy-header-field">内容安全头字段</a> 到一个导入,用户代理必需 <a href="http://w3c.github.io/webappsec/specs/content-security-policy/csp-specification.dev.html#enforce">实施</a> <a href="#dfn-master-document">主文档</a> 的策略到导入文档。
421421
</p>
422422

423-
<h2 id="parsing-imports">Parsing Imports</h2>
423+
<h2 id="parsing-imports">解析导入</h2>
424424

425-
<p>Parsing behaviour of <a href="#dfn-import">imports</a> is defined as a set of changes to the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#parsing">HTML Parsing</a>.</p>
425+
<p><a href="#dfn-import">导入</a> 的解析行为被定义为 <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#parsing">HTML解析</a> 的一组改变。</p>
426426

427-
<h3 id="additions-to-prepare-a-script-algorithm">Additions to Prepare A Script Algorithm</h3>
427+
<h3 id="additions-to-prepare-a-script-algorithm">补充:准备一个脚本算法</h3>
428428

429-
<p>In step 15 of <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#prepare-a-script">prepare a script</a> algorithm, modify the last part of condition which begins with <em>If element does not have a <code>src</code> attribute</em> to read:</p>
429+
<p><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#prepare-a-script">准备一个脚本</a> 算法的第15步,修改条件“<em>如果元素没有 <code>src</code> 属性</em>”的最后部分为:</p>
430430
<div class="monkeypatch">
431-
<p>... and the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#document"><code>Document</code></a> of the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#html-parser">HTML parser</a> or <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-xhtml-syntax.html#xml-parser">XML parser</a> that created the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#the-script-element"><code>script</code></a> element <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#has-a-style-sheet-that-is-blocking-scripts">has a style sheet that is blocking scripts</a> or <a href="#dfn-has-an-import-that-is-blocking-scripts">has an import that is blocking scripts</a></p>
431+
<p>... <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#html-parser">HTML parser</a> <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-xhtml-syntax.html#xml-parser">XML parser</a> 的创建了 <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#the-script-element"><code>script</code></a> 元素的 <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#document"><code>Document</code></a><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#has-a-style-sheet-that-is-blocking-scripts">有阻塞脚本的样式</a> <a href="#dfn-has-an-import-that-is-blocking-scripts">有阻塞脚本的导入</a></p>
432432
</div>
433433

434-
<h3 id="additions-to-tree-construction-algorithm">Additions to Tree Construction Algorithm</h3>
434+
<h3 id="additions-to-tree-construction-algorithm">补充:树构建算法</h3>
435435

436-
<p>At the DOCTYPE part of section <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#the-initial-insertion-mode">12.2.5.4.1 The "initial" insertion mode</a>, modify text <q>if the document is not an iframe srcdoc document...</q> as follows</a>
436+
<p>DOCTYPE 的章节部分 <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#the-initial-insertion-mode">12.2.5.4.1 初始插入模式</a>,修改 <q>如果文档不是一个 iframe srcdoc 文档 ...</q> 为如下:</a>
437437

438438
<div class="monkeypatch">
439-
<p>if the document is not an iframe src document nor an <a href="#dfn-import">import</a>...</p>
439+
<p>如果文档不是一个 iframe srcdoc 文档,也不是一个 <a href="#dfn-import">导入</a> ...</p>
440440
</div>
441441

442-
<p>In sub-condition named <em>Otherwise</em> of condition <em>An end tag whose name is "script"</em> in <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#parsing-main-incdata">"text" insertion mode</a>, modify step 3 to read:</p>
442+
<p><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#parsing-main-incdata">文本插入模式</a> 的条件 <em>Otherwise</em> 的子条件“<em>一个script结束标记</em>”,修改步骤3为:</p>
443443
<div class="monkeypatch">
444444
<ol start="3">
445-
<li>If the parser's <code><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#document">Document</a></code> <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#has-a-style-sheet-that-is-blocking-scripts">has a style sheet that is blocking scripts</a> or <a href="#dfn-has-an-import-that-is-blocking-scripts">has an import that is blocking scripts</a> or <em>the script</em>'s <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#ready-to-be-parser-executed">"ready to be parser-executed"</a> flag is not set: <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#spin-the-event-loop">spin the event loop</a> until the parser's <code><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#document">Document</a></code> <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#has-no-style-sheet-that-is-blocking-scripts">has no style sheet that is blocking scripts</a> and <a href="#dfn-has-no-import-that-is-blocking-scripts">has no import that is blocking scripts</a> and the script's <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#ready-to-be-parser-executed">"ready to be parser-executed"</a> flag is set.</li>
445+
<li>如果解析器的 <code><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#document">Document</a></code> <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#has-a-style-sheet-that-is-blocking-scripts">有阻塞脚本的样式</a><a href="#dfn-has-an-import-that-is-blocking-scripts">有阻塞脚本的导入</a><em>脚本</em><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#ready-to-be-parser-executed">"准备被解析器执行"</a> 标记没有设置,<a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#spin-the-event-loop">spin 事件循环</a>,直到解析器的 <code><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#document">Document</a></code> <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#has-no-style-sheet-that-is-blocking-scripts">没有阻塞脚本样式</a><a href="#dfn-has-no-import-that-is-blocking-scripts">没有阻塞脚本导入</a> 且脚本的 <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#ready-to-be-parser-executed">"准备被解析器执行"</a> 标记被设置。</li>
446446
</ol>
447447
</div>
448448

449-
<h3 id="additions-to-parsing-xhtml-documents">Additions to Parsing XHTML Documents</h3>
449+
<h3 id="additions-to-parsing-xhtml-documents">补充:解析XHTML文档</h3>
450450

451-
<p>Modify step 3 of steps that run following <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#prepare-a-script">preparing</a> the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#the-script-element"><code>script</code></a> element to read:</p>
451+
<p>修改运行 <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#prepare-a-script">准备</a> <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#the-script-element"><code>script</code></a> 元素的第3步如下:</p>
452452
<div class="monkeypatch">
453453
<ol start="3">
454-
<li><p><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#spin-the-event-loop">Spin the event loop</a> until the parser's <code><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#document">Document</a></code> <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#has-no-style-sheet-that-is-blocking-scripts">has no style sheet that is blocking scripts</a> and <a href="#dfn-has-no-import-that-is-blocking-scripts">has no import that is blocking scripts</a> and the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#pending-parsing-blocking-script">pending parsing-blocking script</a>'s <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#ready-to-be-parser-executed">"ready to be parser-executed"</a> flag is set.</p></li>
454+
<li><p><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#spin-the-event-loop">Spin 事件循环</a>,直至解析器的 <code><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#document">Document</a></code> <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#has-no-style-sheet-that-is-blocking-scripts">没有阻塞脚本的样式</a> <a href="#dfn-has-no-import-that-is-blocking-scripts">没有阻塞脚本的导入</a> <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#pending-parsing-blocking-script">等待解析块脚本</a><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#ready-to-be-parser-executed">"准备被解析器执行"</a> 标记被设置。</p></li>
455455
</ol>
456456
</div>
457457

458-
<h2 id="scripts-imports">Scripting in Imports</h2>
458+
<h2 id="scripts-imports">在导入中编写脚本</h2>
459459

460-
<h3 id="additions-to-script-enabling-criteria">Additions to Script Enabling Criteria</h3>
460+
<h3 id="additions-to-script-enabling-criteria">补充:脚本启用标准</h3>
461461

462-
<p>Add following condition to the list of <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#enabling-and-disabling-scripting">Enabling and disabling scripting</a> criteria:</p>
462+
<p>增加下述条件到 <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#enabling-and-disabling-scripting">开启和关闭脚本</a> 标准列表:</p>
463463

464464
<div class="monkeypatch">
465465
<ul>
466-
<li>Scripting is enabled for a <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#node">node</a> if the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#document">Document</a> object of the node is in the <a href="#dfn-import-map">import map</a>.</li>
466+
<li>启用 <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#node">节点</a> 的脚本,如果节点的 <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#document">Document</a> 对象在 <a href="#dfn-import-map">导入映射</a> 中。</li>
467467
</ul>
468468
</div>
469469

470-
<h3 id="additions-to-dom-document-currentscript">Additions to document.currentScript</h3>
470+
<h3 id="additions-to-dom-document-currentscript">补充:document.currentScript</h3>
471471

472-
<p>
473-
Modify the definition of <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-document-currentscript"><code>document.currentScript</code></a>
474-
as follows:
475-
</p>
472+
<p>修改 <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-document-currentscript"><code>document.currentScript</code> </a>的定义为:</p>
476473
<div class="monkeypatch">
477-
The <dfn id="dom-document-currentscript" title="dom-document-currentScript"><code>currentScript</code></dfn> attribute, on getting,
478-
must return the value to which it was most recently initialized in the document or the <a href="#dfn-import-map">import map</a> of the document.
479-
When the Document is created, the <code>currentScript</code> must be initialized to null.
480-
If the Document is an <a href="#dfn-imported-document">imported document</a>, its <code>currentScript</code> is always null.
474+
<dfn id="dom-document-currentscript" title="dom-document-currentScript"><code>currentScript</code></dfn> 属性,必需返回文档或文档的 <a href="#dfn-import-map">导入映射</a> 中最近初始化的脚本。当文档创建后,<code>currentScript</code> 属性必需初始化为 null。如果文档为 <a href="#dfn-imported-document">导入文档</a>,那么它的 <code>currentScript</code> 始终为 null。
481475
</div>
482476

483-
<h2 id="style-imports">Style processing with Imports</h2>
477+
<h2 id="style-imports">导入的样式处理</h2>
484478

485-
<p>The contents of the <code><a href="http://www.whatwg.org/specs/web-apps/current-work/#the-style-element">style</a></code> elements and
486-
the external resources of the <code><a href="http://www.whatwg.org/specs/web-apps/current-work/#the-link-element">link</a></code> elements in <a href="#dfn-import">imports</a> <strong>must</strong> be considered as input sources of the <a href="http://www.w3.org/TR/CSS21/intro.html#processing-model">style processing model</a> of the <a href="#dfn-master-document">master document</a>.</p>
479+
<p><a href="#dfn-import">导入</a><code><a href="http://www.whatwg.org/specs/web-apps/current-work/#the-style-element">style</a></code> 元素和外部资源 <code><a href="http://www.whatwg.org/specs/web-apps/current-work/#the-link-element">link</a></code> 元素的内容<strong>必需</strong>被当做 <a href="#dfn-master-document">主文档</a><a href="http://www.w3.org/TR/CSS21/intro.html#processing-model">样式处理模型</a> 的输入源。</p>
487480

488481
<div class="fixme">
489482
<p>Between declarations from different documents, the document order in terms of <a href="http://www.w3.org/TR/css3-cascade/#cascade-order">order of appearance</a> is defined by comparing two elements <var>x</var>, whose owner document is <var>Dx</var>, and <var>y</var>, whose owner document is <var>Dy</var>, as follows:</p>

0 commit comments

Comments
 (0)