Skip to content

Commit

Permalink
Editorial: swap order of DocumentType and DocumentFragment
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Mar 15, 2016
1 parent 6c4bf92 commit 25d680d
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 102 deletions.
101 changes: 44 additions & 57 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4913,47 +4913,6 @@ returns true) so that old pages don't stop working.
</div>


<h3 id='interface-documentfragment'>Interface {{DocumentFragment}}</h3>
<pre class=idl>
[Constructor,
Exposed=Window]
interface DocumentFragment : Node {
};
</pre>

A {{DocumentFragment}} <a>node</a> can have an
associated <a for="/">element</a> named
<dfn export id=concept-documentfragment-host for=DocumentFragment>host</dfn>.

An object <var>A</var> is a
<dfn export id=concept-tree-host-including-inclusive-ancestor>host-including inclusive ancestor</dfn>
of an object <var>B</var>, if either <var>A</var> is an
<a>inclusive ancestor</a> of
<var>B</var>, or if <var>B</var>'s <a for=tree>root</a>
has an associated <a for=DocumentFragment>host</a> and
<var>A</var> is a
<a>host-including inclusive ancestor</a>
of <var>B</var>'s <a for=tree>root</a>'s
<a for=DocumentFragment>host</a>.

<p class="note no-backref">The {{DocumentFragment}} <a>node</a>'s
<a for=DocumentFragment>host</a> concept is useful for HTML's <{template}> element and the
{{ShadowRoot}} object and impacts the <a>pre-insert</a> and <a>replace</a> algorithms.

<!-- XXX xref
XXX ShadowRoot is a Node technically -->

<dl class=domintro>
<dt><code><var>tree</var> = new {{DocumentFragment()}}</code>
<dd>Returns a new {{DocumentFragment}} <a>node</a>.
</dl>

The <dfn constructor for=DocumentFragment>DocumentFragment()</dfn> constructor
must return a new {{DocumentFragment}} <a>node</a> whose
<a>node document</a> is the global object's associated
<a>document</a>.


<h3 id='interface-documenttype'>Interface {{DocumentType}}</h3>

<pre class=idl>
Expand All @@ -4965,31 +4924,59 @@ interface DocumentType : Node {
};
</pre>

{{DocumentType}} <a>nodes</a> are
simply known as <dfn export id=concept-doctype lt="doctype">doctypes</dfn>.
<p>{{DocumentType}} <a>nodes</a> are simply known as
<dfn export id=concept-doctype lt="doctype">doctypes</dfn>.

<a>Doctypes</a> have an associated
<p><a>Doctypes</a> have an associated
<dfn export id=concept-doctype-name for=DocumentType>name</dfn>,
<dfn export id=concept-doctype-publicid for=DocumentType>public ID</dfn>, and
<dfn export id=concept-doctype-systemid for=DocumentType>system ID</dfn>.

When a <a>doctype</a> is created, its
<a for=DocumentType>name</a> is always given. Unless
explicitly given when a <a>doctype</a> is
created, its <a>public ID</a> and
<a>system ID</a> are the empty string.
<p>When a <a>doctype</a> is created, its <a for=DocumentType>name</a> is always given. Unless
explicitly given when a <a>doctype</a> is created, its <a>public ID</a> and <a>system ID</a> are the
empty string.

The <dfn attribute for="DocumentType">name</dfn> attribute
must return the <a for=DocumentType>name</a>.
<p>The <dfn attribute for=DocumentType><code>name</code></dfn> attribute's getter must return the
<a>context object</a>'s <a for=DocumentType>name</a>.

The <dfn attribute for="DocumentType">publicId</dfn>
attribute must return the
<a>public ID</a>.
<p>The <dfn attribute for=DocumentType><code>publicId</code></dfn> attribute's getter must return
the <a>context object</a>'s <a>public ID</a>.

The <dfn attribute for="DocumentType">systemId</dfn>
attribute must return the
<a>system ID</a>.
<p>The <dfn attribute for=DocumentType><code>systemId</code></dfn> attribute's getter must return
the <a>context object</a>'s <a>system ID</a>.


<h3 id='interface-documentfragment'>Interface {{DocumentFragment}}</h3>

<pre class=idl>
[Constructor,
Exposed=Window]
interface DocumentFragment : Node {
};
</pre>

<p>A {{DocumentFragment}} <a>node</a> can have an associated <a for="/">element</a> named
<dfn export id=concept-documentfragment-host for=DocumentFragment>host</dfn>.

<p>An object <var>A</var> is a
<dfn export id=concept-tree-host-including-inclusive-ancestor>host-including inclusive ancestor</dfn>
of an object <var>B</var>, if either <var>A</var> is an <a>inclusive ancestor</a> of <var>B</var>,
or if <var>B</var>'s <a for=tree>root</a> has an associated <a for=DocumentFragment>host</a> and
<var>A</var> is a <a>host-including inclusive ancestor</a> of <var>B</var>'s <a for=tree>root</a>'s
<a for=DocumentFragment>host</a>.

<p class="note no-backref">The {{DocumentFragment}} <a>node</a>'s <a for=DocumentFragment>host</a>
concept is useful for HTML's <{template}> element and for <a>shadow roots</a>, and impacts the
<a>pre-insert</a> and <a>replace</a> algorithms.

<dl class=domintro>
<dt><code><var>tree</var> = new {{DocumentFragment()}}</code>
<dd>Returns a new {{DocumentFragment}} <a>node</a>.
</dl>

<p>The <dfn constructor for=DocumentFragment><code>DocumentFragment()</code></dfn> constructor, when
invoked, must return a new {{DocumentFragment}} <a>node</a> whose <a>node document</a> is the
global object's associated <a>document</a>.


<h3 id='interface-element'>Interface {{Element}}</h3>
Expand Down
Loading

0 comments on commit 25d680d

Please sign in to comment.