Skip to content

Commit

Permalink
Consistify
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Jan 1, 2016
1 parent b4664d6 commit b58cf9b
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 115 deletions.
153 changes: 63 additions & 90 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4081,26 +4081,24 @@ this constructor does not return an {{XMLDocument}} object, but a
<a>document</a> ({{Document}} object).

The
<dfn attribute for="Document">implementation</dfn>
attribute must return the {{DOMImplementation}} object that is
associated with the <a>document</a>.
<dfn attribute for=Document><code>implementation</code></dfn> attribute's getter must return the
{{DOMImplementation}} object that is associated with the <a>document</a>.

The <dfn attribute for="Document"><code>URL</code></dfn> and
<dfn attribute for="Document"><code>documentURI</code></dfn> attributes' getters must return the
The <dfn attribute for=Document><code>URL</code></dfn> attribute's getter and
<dfn attribute for=Document><code>documentURI</code></dfn> attribute's getter must return the
<a for=Document>URL</a>, <a lt="URL serializer" spec=url>serialized</a>.

The <dfn attribute for="Document">origin</dfn>
attribute must return the
<a lt="Unicode serialization of an origin">Unicode serialization</a>
of <a>context object</a>'s <a>origin</a>.
The <dfn attribute for=Document><code>origin</code></dfn> attribute's getter must return the
<a lt="Unicode serialization of an origin">Unicode serialization</a> of <a>context object</a>'s
<a>origin</a>.

The <dfn attribute for="Document"><code>compatMode</code></dfn> attribute's getter must
The <dfn attribute for=Document><code>compatMode</code></dfn> attribute's getter must
return "<code>BackCompat</code>" if <a>context object</a>'s <a for=Document>mode</a> is
"<code>quirks</code>", and "<code>CSS1Compat</code>" otherwise.

The <dfn attribute for="Document"><code>characterSet</code></dfn> attribute's getter,
<dfn attribute for="Document"><code>charset</code></dfn> attribute's getter, and
<dfn attribute for="Document"><code>inputEncoding</code></dfn> attribute's getter must run these
The <dfn attribute for=Document><code>characterSet</code></dfn> attribute's getter,
<dfn attribute for=Document><code>charset</code></dfn> attribute's getter, and
<dfn attribute for=Document><code>inputEncoding</code></dfn> attribute's getter must run these
steps:

<ol>
Expand Down Expand Up @@ -4201,8 +4199,7 @@ steps:
<li>Return <var>name</var>.
</ol>

The <dfn attribute for="Document">contentType</dfn>
attribute must return the
The <dfn attribute for=Document><code>contentType</code></dfn> attribute's getter must return the
<a for=Document>content type</a>.

<hr>
Expand Down Expand Up @@ -4273,19 +4270,14 @@ attribute must return the
space-separated list of classes.
</dl>

The <dfn attribute for="Document">doctype</dfn> attribute
must return the <a>child</a> of the
<a>document</a> that is a
<a>doctype</a>, and null otherwise.
The <dfn attribute for=Document><code>doctype</code></dfn> attribute's getter must return the
<a>child</a> of the <a>document</a> that is a <a>doctype</a>, and null otherwise.

The
<dfn attribute for="Document">documentElement</dfn>
attribute must return the <a>document element</a>.
The <dfn attribute for=Document><code>documentElement</code></dfn> attribute's getter must return
the <a>document element</a>.

The
<dfn method for="Document">getElementsByTagName(<var>localName</var>)</dfn>
method must return the
<a>list of elements with local name <var>localName</var></a>
The <dfn method for=Document><code>getElementsByTagName(<var>localName</var>)</code></dfn>
method, when invoked, must return the <a>list of elements with local name <var>localName</var></a>
for the <a>context object</a>.

<p class="note no-backref">Thus, in an <a>HTML document</a>,
Expand All @@ -4295,18 +4287,14 @@ for the <a>context object</a>.
the <a>HTML namespace</a>, but not <code>&lt;FOO></code> elements
that are in the <a>HTML namespace</a>.


The
<dfn method for="Document">getElementsByTagNameNS(<var>namespace</var>, <var>localName</var>)</dfn>
method must return the
<a>list of elements with namespace <var>namespace</var> and local name <var>localName</var></a>
for the <a>context object</a>.

<dfn method for=Document><code>getElementsByTagNameNS(<var>namespace</var>, <var>localName</var>)</code></dfn>
method, when invoked, must return the
<a>list of elements with namespace <var>namespace</var> and local name <var>localName</var></a> for
the <a>context object</a>.

The
<dfn method for="Document">getElementsByClassName(<var>classNames</var>)</dfn>
method must return the
<a>list of elements with class names <var>classNames</var></a>
The <dfn method for=Document><code>getElementsByClassName(<var>classNames</var>)</code></dfn>
method, when invoked, must return the <a>list of elements with class names <var>classNames</var></a>
for the <a>context object</a>.

<div class="example">
Expand Down Expand Up @@ -4427,7 +4415,8 @@ stated otherwise.
and the <a>HTML namespace</a>, the {{HTMLHtmlElement}} interface is used.
[[!HTML]]

The <dfn method for="Document">createElement(<var>localName</var>)</dfn> method must run the these steps:
The <dfn method for=Document><code>createElement(<var>localName</var>)</code></dfn> method, when
invoked, must run the these steps:

<ol>
<li>If <var>localName</var> does not match the
Expand All @@ -4452,8 +4441,8 @@ The <dfn method for="Document">createElement(<var>localName</var>)</dfn> method
</ol>

The
<dfn method for="Document">createElementNS(<var>namespace</var>, <var>qualifiedName</var>)</dfn>
method must run these steps:
<dfn method for=Document><code>createElementNS(<var>namespace</var>, <var>qualifiedName</var>)</code></dfn>
method, when invoked, must run these steps:

<ol>
<li>Let <var>namespace</var>, <var>prefix</var>, and <var>localName</var> be the result of passing
Expand All @@ -4472,37 +4461,28 @@ method must run these steps:
<a>node document</a> set to the <a>context object</a>.
</ol>

The
<dfn method for="Document">createDocumentFragment()</dfn>
method must return a new {{DocumentFragment}}
<a>node</a> with its
<a>node document</a> set to the
The <dfn method for=Document><code>createDocumentFragment()</code></dfn> method, when invoked,
must return a new {{DocumentFragment}} <a>node</a> with its <a>node document</a> set to the
<a>context object</a>.

The
<dfn method for="Document">createTextNode(<var>data</var>)</dfn>
method must return a new {{Text}}
<a>node</a> with its
<a>data</a> set to <var>data</var> and
<a>node document</a> set to the
<a>context object</a>.
The <dfn method for=Document><code>createTextNode(<var>data</var>)</code></dfn> method, when
invoked, must return a new {{Text}} <a>node</a> with its <a>data</a> set to <var>data</var> and
<a>node document</a> set to the <a>context object</a>.

<p class="note no-backref">No check is performed that <var>data</var> consists of
characters that match the <a type>Char</a> production.

The
<dfn method for="Document">createComment(<var>data</var>)</dfn>
method must return a new {{Comment}}
<a>node</a> with its
<a>data</a> set to <var>data</var> and
<a>node document</a> set to the
<a>context object</a>.
The <dfn method for=Document><code>createComment(<var>data</var>)</code></dfn> method, when invoked,
must return a new {{Comment}} <a>node</a> with its <a>data</a> set to <var>data</var> and
<a>node document</a> set to the <a>context object</a>.

<p class="note no-backref">No check is performed that <var>data</var> consists of
characters that match the <a type>Char</a> production
or that it contains two adjacent hyphens or ends with a hyphen.

The <dfn method for=Document>createProcessingInstruction(<var>target</var>, <var>data</var>)</dfn> method must run these steps:
The
<dfn method for=Document><code>createProcessingInstruction(<var>target</var>, <var>data</var>)</code></dfn>
method, when invoked, must run these steps:

<ol>
<li>If <var>target</var> does not match the
Expand Down Expand Up @@ -4556,9 +4536,8 @@ The <dfn method for=Document>createProcessingInstruction(<var>target</var>, <var
<var>node</var> is a <a>shadow root</a>, throws a {{HierarchyRequestError}} exception.
</dl>

The
<dfn method for="Document">importNode(<var>node</var>, <var>deep</var>)</dfn>
method must run these steps:
The <dfn method for=Document><code>importNode(<var>node</var>, <var>deep</var>)</code></dfn> method,
when invoked, must run these steps:

<ol>
<li>If <var>node</var> is a <a>document</a> or <a>shadow root</a>, <a>throw</a> a
Expand Down Expand Up @@ -4593,9 +4572,8 @@ a <var>document</var>, run these steps:
<var>oldDocument</var>.
</ol>

The
<dfn method for="Document">adoptNode(<var>node</var>)</dfn>
method must run these steps:
The <dfn method for=Document><code>adoptNode(<var>node</var>)</code></dfn> method, when invoked,
must run these steps:

<ol>
<li>If <var>node</var> is a <a>document</a>, <a>throw</a> a {{NotSupportedError}}
Expand All @@ -4612,9 +4590,8 @@ method must run these steps:

<hr>

The
<dfn method for="Document">createAttribute(<var>localName</var>)</dfn>
method, when invoked, must run these steps:
The <dfn method for=Document><code>createAttribute(<var>localName</var>)</code></dfn> method, when
invoked, must run these steps:

<ol>
<li>If <var>localName</var> does not match the <code><a type>Name</a></code>
Expand All @@ -4629,7 +4606,7 @@ method, when invoked, must run these steps:
</ol>

The
<dfn method for="Document"><code>createAttributeNS(<var>namespace</var>, <var>qualifiedName</var>)</code></dfn>
<dfn method for=Document><code>createAttributeNS(<var>namespace</var>, <var>qualifiedName</var>)</code></dfn>
method, when invoked, must run these steps:

<ol>
Expand All @@ -4644,9 +4621,8 @@ method, when invoked, must run these steps:

<hr>

The
<dfn method for="Document">createEvent(<var>interface</var>)</dfn>
method must run these steps:
The <dfn method for=Document><code>createEvent(<var>interface</var>)</code></dfn> method, when
invoked, must run these steps:

<ol>
<li>Let <var>constructor</var> be null.
Expand Down Expand Up @@ -4694,19 +4670,16 @@ method must run these steps:

<hr>

The <dfn method for="Document">createRange()</dfn>
method must return a new <a>range</a> with
(<a>context object</a>, 0) as its
<a>start</a> and
<a>end</a>.
The <dfn method for=Document><code>createRange()</code></dfn> method, when invoked, must return a
new <a>range</a> with (<a>context object</a>, 0) as its <a>start</a> and <a>end</a>.

<p class=note>The {{Range/Range()}} constructor ought to be used instead.

<hr>

The
<dfn method for="Document">createNodeIterator(<var>root</var>, <var>whatToShow</var>, <var>filter</var>)</dfn>
method must run these steps:
<dfn method for=Document><code>createNodeIterator(<var>root</var>, <var>whatToShow</var>, <var>filter</var>)</code></dfn>
method, when invoked, must run these steps:

<ol>
<li>Create a {{NodeIterator}} object.
Expand All @@ -4719,8 +4692,8 @@ method must run these steps:
</ol>

The
<dfn method for="Document">createTreeWalker(<var>root</var>, <var>whatToShow</var>, <var>filter</var>)</dfn>
method must run these steps:
<dfn method for=Document><code>createTreeWalker(<var>root</var>, <var>whatToShow</var>, <var>filter</var>)</code></dfn>
method, when invoked, must run these steps:

<ol>
<li>Create a {{TreeWalker}} object.
Expand Down Expand Up @@ -8928,15 +8901,15 @@ Interface members:
<dt>{{Document}}
<dd>
<ul class=brief>
<li><dfn method for="Document">createCDATASection()</dfn>
<li><dfn method for="Document">createEntityReference()</dfn>
<li><dfn attribute for="Document">xmlEncoding</dfn>
<li><dfn attribute for="Document">xmlStandalone</dfn>
<li><dfn attribute for="Document">xmlVersion</dfn>
<li><dfn attribute for="Document">strictErrorChecking</dfn>
<li><dfn attribute for="Document">domConfig</dfn>
<li><dfn method for="Document">normalizeDocument()</dfn>
<li><dfn method for="Document">renameNode()</dfn>
<li><dfn method for=Document>createCDATASection()</dfn>
<li><dfn method for=Document>createEntityReference()</dfn>
<li><dfn attribute for=Document>xmlEncoding</dfn>
<li><dfn attribute for=Document>xmlStandalone</dfn>
<li><dfn attribute for=Document>xmlVersion</dfn>
<li><dfn attribute for=Document>strictErrorChecking</dfn>
<li><dfn attribute for=Document>domConfig</dfn>
<li><dfn method for=Document>normalizeDocument()</dfn>
<li><dfn method for=Document>renameNode()</dfn>
</ul>

<dt>{{DOMImplementation}}
Expand Down
Loading

0 comments on commit b58cf9b

Please sign in to comment.