Skip to content

Commit

Permalink
Editorial: make "is" and "prefix" optional in "create an element"
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic authored and annevk committed Apr 19, 2016
1 parent a878733 commit 5fc5624
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
20 changes: 12 additions & 8 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3886,9 +3886,9 @@ dom-Range-extractContents, dom-Range-cloneContents -->
<p>If <var>node</var> is an <a for=/>element</a>, then:

<ol>
<li><p>Let <var>copy</var> be the result of <a>creating an element</a>, given <var>document</var>,
<var>node</var>'s <a for=Element>local name</a>, <var>node</var>'s
<a for=Element>namespace prefix</a>, <var>node</var>'s <a for=Element>namespace</a>, and the
<li><p>Let <var>copy</var> be the result of <a>creating an element</a>, given
<var>document</var>, <var>node</var>'s <a for=Element>local name</a>, <var>node</var>'s
<a for=Element>namespace</a>, <var>node</var>'s <a for=Element>namespace prefix</a>, and the
value of <var>node</var>'s <code>is</code> attribute if present (or null if not). The
<var>synchronous custom elements flag</var> should be unset.

Expand Down Expand Up @@ -4853,8 +4853,8 @@ invoked, must run these steps:
"<code>application/xhtml+xml</code>", and null otherwise.

<li>Let <var>element</var> be the result of <a>creating an element</a> given the
<a>context object</a>, <var>localName</var>, null, <var>namespace</var>, <var>is</var>, and
with the <var>synchronous custom elements</var> flag set. Rethrow any exceptions.
<a>context object</a>, <var>localName</var>, <var>namespace</var>, null, <var>is</var>, and with
the <var>synchronous custom elements</var> flag set. Rethrow any exceptions.

<li>If <var>is</var> is non-null, then <a>set an attribute value</a> for <var>element</var> using
"<code>is</code>" and <var>is</var>.
Expand All @@ -4881,7 +4881,7 @@ invoked, must run these steps:
{{NotFoundError}}.

<li><p>Let <var>element</var> be the result of <a>creating an element</a> given
<var>document</var>, <var>localName</var>, <var>prefix</var>, <var>namespace</var>, <var>is</var>,
<var>document</var>, <var>localName</var>, <var>namespace</var>, <var>prefix</var>, <var>is</var>,
and with the <var>synchronous custom elements</var> flag set. Rethrow any exceptions.

<li>If <var>is</var> is non-null, then <a>set an attribute value</a> for <var>element</var> using
Expand Down Expand Up @@ -5593,10 +5593,14 @@ required to do so. The standard has this concept for readability.

<p>To
<dfn export id=concept-create-element lt="create an element|creating an element">create an element</dfn>,
given a <var>document</var>, <var>localName</var>, <var>prefix</var>, <var>namespace</var>,
<var>is</var>, and optional <var>synchronous custom elements flag</var>, run these steps:
given a <var>document</var>, <var>localName</var>, <var>namespace</var>, and optional
<var>prefix</var>, <var>is</var>, and <var>synchronous custom elements flag</var>, run these steps:

<ol>
<li><p>If <var>prefix</var> was not given, let <var>prefix</var> be null.

<li><p>If <var>is</var> was not given, let <var>is</var> be null.

<li><p>Let <var>result</var> be null.

<li><p>Let <var>definition</var> be the result of
Expand Down
14 changes: 9 additions & 5 deletions dom.html
Original file line number Diff line number Diff line change
Expand Up @@ -2292,7 +2292,7 @@ <h3 class="heading settled" data-level="4.4" id="interface-node"><span class="se
<p>If <var>node</var> is an <a data-link-type="dfn" href="#concept-element">element</a>, then: </p>
<ol>
<li>
<p>Let <var>copy</var> be the result of <a data-link-type="dfn" href="#concept-create-element">creating an element</a>, given <var>document</var>, <var>node</var>’s <a data-link-type="dfn" href="#concept-element-local-name">local name</a>, <var>node</var>’s <a data-link-type="dfn" href="#concept-element-namespace-prefix">namespace prefix</a>, <var>node</var>’s <a data-link-type="dfn" href="#concept-element-namespace">namespace</a>, and the
<p>Let <var>copy</var> be the result of <a data-link-type="dfn" href="#concept-create-element">creating an element</a>, given <var>document</var>, <var>node</var>’s <a data-link-type="dfn" href="#concept-element-local-name">local name</a>, <var>node</var>’s <a data-link-type="dfn" href="#concept-element-namespace">namespace</a>, <var>node</var>’s <a data-link-type="dfn" href="#concept-element-namespace-prefix">namespace prefix</a>, and the
value of <var>node</var>’s <code>is</code> attribute if present (or null if not). The <var>synchronous custom elements flag</var> should be unset. </p>
<li>
<p>For each <var>attribute</var> in <var>node</var>’s <a data-link-type="dfn" href="#concept-element-attribute">attribute list</a>, in order, run these substeps: </p>
Expand Down Expand Up @@ -2741,8 +2741,8 @@ <h3 class="heading settled" data-level="4.5" id="interface-document"><span class
<li>If <var>is</var> is non-null and <var>definition</var> is null, then <a data-link-type="dfn" href="https://heycam.github.io/webidl/#dfn-throw">throw</a> a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror">NotFoundError</a></code>.
<li>Let <var>namespace</var> be the <a data-link-type="dfn" href="#html-namespace">HTML namespace</a>, if the <a data-link-type="dfn" href="#context-object">context object</a>’s <a data-link-type="dfn" href="#concept-document-content-type">content type</a> is "<code>text/html</code>" or
"<code>application/xhtml+xml</code>", and null otherwise.
<li>Let <var>element</var> be the result of <a data-link-type="dfn" href="#concept-create-element">creating an element</a> given the <a data-link-type="dfn" href="#context-object">context object</a>, <var>localName</var>, null, <var>namespace</var>, <var>is</var>, and
with the <var>synchronous custom elements</var> flag set. Rethrow any exceptions.
<li>Let <var>element</var> be the result of <a data-link-type="dfn" href="#concept-create-element">creating an element</a> given the <a data-link-type="dfn" href="#context-object">context object</a>, <var>localName</var>, <var>namespace</var>, null, <var>is</var>, and with
the <var>synchronous custom elements</var> flag set. Rethrow any exceptions.
<li>If <var>is</var> is non-null, then <a data-link-type="dfn" href="#concept-element-attributes-set-value">set an attribute value</a> for <var>element</var> using
"<code>is</code>" and <var>is</var>.
<li>Return <var>element</var>.
Expand All @@ -2756,7 +2756,7 @@ <h3 class="heading settled" data-level="4.5" id="interface-document"><span class
<li>Let <var>definition</var> be the result of <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/scripting.html#look-up-a-custom-element-definition">looking up a custom element definition</a>, given the <a data-link-type="dfn" href="#context-object">context object</a>, <var>namespace</var>, <var>localName</var>, and <var>is</var>.
<li>If <var>is</var> is non-null and <var>definition</var> is null, then <a data-link-type="dfn" href="https://heycam.github.io/webidl/#dfn-throw">throw</a> a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror">NotFoundError</a></code>.
<li>
<p>Let <var>element</var> be the result of <a data-link-type="dfn" href="#concept-create-element">creating an element</a> given <var>document</var>, <var>localName</var>, <var>prefix</var>, <var>namespace</var>, <var>is</var>,
<p>Let <var>element</var> be the result of <a data-link-type="dfn" href="#concept-create-element">creating an element</a> given <var>document</var>, <var>localName</var>, <var>namespace</var>, <var>prefix</var>, <var>is</var>,
and with the <var>synchronous custom elements</var> flag set. Rethrow any exceptions. </p>
<li>If <var>is</var> is non-null, then <a data-link-type="dfn" href="#concept-element-attributes-set-value">set an attribute value</a> for <var>element</var> using
"<code>is</code>" and <var>is</var>.
Expand Down Expand Up @@ -3268,8 +3268,12 @@ <h3 class="heading settled" data-level="4.9" id="interface-element"><span class=
<p class="note" role="note">User agents could have this as an internal slot as an optimization, but are not
required to do so. The standard has this concept for readability. </p>
<p>To <dfn data-dfn-type="dfn" data-export="" data-lt="create an element|creating an element" id="concept-create-element">create an element<a class="self-link" href="#concept-create-element"></a></dfn>,
given a <var>document</var>, <var>localName</var>, <var>prefix</var>, <var>namespace</var>, <var>is</var>, and optional <var>synchronous custom elements flag</var>, run these steps: </p>
given a <var>document</var>, <var>localName</var>, <var>namespace</var>, and optional <var>prefix</var>, <var>is</var>, and <var>synchronous custom elements flag</var>, run these steps: </p>
<ol>
<li>
<p>If <var>prefix</var> was not given, let <var>prefix</var> be null. </p>
<li>
<p>If <var>is</var> was not given, let <var>is</var> be null. </p>
<li>
<p>Let <var>result</var> be null. </p>
<li>
Expand Down

0 comments on commit 5fc5624

Please sign in to comment.