Permalink
Browse files

Define the interface part of createElement() and createElementNS(). R…

…equires changes to other specifications.

Fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=20753
  • Loading branch information...
1 parent 77c1967 commit 84697097adb7aeb68ff0a3d80f079a9d733c62b2 @annevk annevk committed Jan 25, 2013
Showing with 58 additions and 34 deletions.
  1. +28 −16 Overview.src.html
  2. +30 −18 dom-core.html
View
@@ -4126,6 +4126,14 @@ <h2 class=no-num>Goals</h2>
exception will be thrown.
</dl>
+<p>The <dfn title=concept-element-interface>element interface</dfn> for any
+<var title>name</var> and <var title>namespace</var> is <code>Element</code>, unless
+stated otherwise.
+
+<p class=note>The HTML Standard will e.g. define that for <code title>html</code> and the
+<span>HTML namespace</span>, the <code title>HTMLHtmlElement</code> interface is used.
+<span data-anolis-ref>HTML</span>
+
<p>The <dfn title=dom-Document-createElement><code>createElement(<var title>localName</var>)</code></dfn> method must run the these steps:
<ol>
@@ -4140,13 +4148,15 @@ <h2 class=no-num>Goals</h2>
<span>converted to ASCII lowercase</span>.
<!-- XXX why restrict this to HTML documents? -->
- <li><p>Return a new <span title=concept-element>element</span> with no
- attributes, <span title=concept-element-namespace>namespace</span> set to
- the <span>HTML namespace</span>,
- <span title=concept-element-local-name>local name</span> set to
- <var title>localName</var>, and
- <span title=concept-node-document>node document</span> set to the
- <span>context object</span>.
+ <li><p>Let <var title>interface</var> be the
+ <span title=concept-element-interface>element interface</span> for
+ <var title>localName</var> and the <span>HTML namespace</span>.
+
+ <li><p>Return a new <span title=concept-element>element</span> that implements <var title>interface</var>,
+ with no attributes,
+ <span title=concept-element-namespace>namespace</span> set to the <span>HTML namespace</span>,
+ <span title=concept-element-local-name>local name</span> set to <var title>localName</var>, and
+ <span title=concept-node-document>node document</span> set to the <span>context object</span>.
</ol>
<p>The
@@ -4184,15 +4194,17 @@ <h2 class=no-num>Goals</h2>
and neither <var title>qualifiedName</var> nor <var title>prefix</var> is
"<code title>xmlns</code>", <span title=concept-throw>throw</span> a
"<code>NamespaceError</code>" exception and terminate these steps.
- <li><p>Return a new <span title=concept-element>element</span> with no
- attributes, <span title=concept-element-namespace>namespace</span> set to
- <var title>namespace</var>,
- <span title=concept-element-namespace-prefix>namespace prefix</span> set to
- <var title>prefix</var>,
- <span title=concept-element-local-name>local name</span> set to
- <var title>localName</var>, and
- <span title=concept-node-document>node document</span> set to the
- <span>context object</span>.
+
+ <li><p>Let <var title>interface</var> be the
+ <span title=concept-element-interface>element interface</span> for
+ <var title>localName</var> and <var title>namespace</var>.
+
+ <li><p>Return a new <span title=concept-element>element</span> that implements <var title>interface</var>,
+ with no attributes,
+ <span title=concept-element-namespace>namespace</span> set to <var title>namespace</var>,
+ <span title=concept-element-namespace-prefix>namespace prefix</span> set to <var title>prefix</var>,
+ <span title=concept-element-local-name>local name</span> set to <var title>localName</var>, and
+ <span title=concept-node-document>node document</span> set to the <span>context object</span>.
</ol>
<p>The
View
@@ -10,7 +10,7 @@
<p><a class="logo" href="//www.whatwg.org/"><img alt="WHATWG" height="100" src="//resources.whatwg.org/logo-dom.svg" width="100"></a></p>
<h1>DOM</h1>
- <h2 class="no-num no-toc" id="living-standard-—-last-updated-7-january-2013">Living Standard — Last Updated 7 January 2013</h2>
+ <h2 class="no-num no-toc" id="living-standard-—-last-updated-25-january-2013">Living Standard — Last Updated 25 January 2013</h2>
<dl>
<dt>This Version:
@@ -42,7 +42,7 @@ <h2 class="no-num no-toc" id="living-standard-—-last-updated-7-january-2013">L
<p class="copyright"><a href="http://creativecommons.org/publicdomain/zero/1.0/" rel="license"><img alt="CC0" src="http://i.creativecommons.org/p/zero/1.0/80x15.png"></a>
To the extent possible under law, the editors have waived all copyright and
related or neighboring rights to this work. In addition, as of
-7 January 2013, the editors have made this specification available
+25 January 2013, the editors have made this specification available
under the
<a href="http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0" rel="license">Open Web Foundation Agreement Version 1.0</a>,
which is available at
@@ -4196,6 +4196,14 @@ <h3 id="interface-document"><span class="secno">5.5 </span>Interface <code><a hr
exception will be thrown.
</dl>
+<p>The <dfn id="concept-element-interface" title="concept-element-interface">element interface</dfn> for any
+<var title="">name</var> and <var title="">namespace</var> is <code><a href="#element">Element</a></code>, unless
+stated otherwise.
+
+<p class="note">The HTML Standard will e.g. define that for <code title="">html</code> and the
+<a href="#html-namespace">HTML namespace</a>, the <code title="">HTMLHtmlElement</code> interface is used.
+<a href="#refsHTML">[HTML]</a>
+
<p>The <dfn id="dom-document-createelement" title="dom-Document-createElement"><code>createElement(<var title="">localName</var>)</code></dfn> method must run the these steps:
<ol>
@@ -4210,13 +4218,15 @@ <h3 id="interface-document"><span class="secno">5.5 </span>Interface <code><a hr
<a href="#converted-to-ascii-lowercase">converted to ASCII lowercase</a>.
<!-- XXX why restrict this to HTML documents? -->
- <li><p>Return a new <a href="#concept-element" title="concept-element">element</a> with no
- attributes, <a href="#concept-element-namespace" title="concept-element-namespace">namespace</a> set to
- the <a href="#html-namespace">HTML namespace</a>,
- <a href="#concept-element-local-name" title="concept-element-local-name">local name</a> set to
- <var title="">localName</var>, and
- <a href="#concept-node-document" title="concept-node-document">node document</a> set to the
- <a href="#context-object">context object</a>.
+ <li><p>Let <var title="">interface</var> be the
+ <a href="#concept-element-interface" title="concept-element-interface">element interface</a> for
+ <var title="">localName</var> and the <a href="#html-namespace">HTML namespace</a>.
+
+ <li><p>Return a new <a href="#concept-element" title="concept-element">element</a> that implements <var title="">interface</var>,
+ with no attributes,
+ <a href="#concept-element-namespace" title="concept-element-namespace">namespace</a> set to the <a href="#html-namespace">HTML namespace</a>,
+ <a href="#concept-element-local-name" title="concept-element-local-name">local name</a> set to <var title="">localName</var>, and
+ <a href="#concept-node-document" title="concept-node-document">node document</a> set to the <a href="#context-object">context object</a>.
</ol>
<p>The
@@ -4254,15 +4264,17 @@ <h3 id="interface-document"><span class="secno">5.5 </span>Interface <code><a hr
and neither <var title="">qualifiedName</var> nor <var title="">prefix</var> is
"<code title="">xmlns</code>", <a href="#concept-throw" title="concept-throw">throw</a> a
"<code><a href="#namespaceerror">NamespaceError</a></code>" exception and terminate these steps.
- <li><p>Return a new <a href="#concept-element" title="concept-element">element</a> with no
- attributes, <a href="#concept-element-namespace" title="concept-element-namespace">namespace</a> set to
- <var title="">namespace</var>,
- <a href="#concept-element-namespace-prefix" title="concept-element-namespace-prefix">namespace prefix</a> set to
- <var title="">prefix</var>,
- <a href="#concept-element-local-name" title="concept-element-local-name">local name</a> set to
- <var title="">localName</var>, and
- <a href="#concept-node-document" title="concept-node-document">node document</a> set to the
- <a href="#context-object">context object</a>.
+
+ <li><p>Let <var title="">interface</var> be the
+ <a href="#concept-element-interface" title="concept-element-interface">element interface</a> for
+ <var title="">localName</var> and <var title="">namespace</var>.
+
+ <li><p>Return a new <a href="#concept-element" title="concept-element">element</a> that implements <var title="">interface</var>,
+ with no attributes,
+ <a href="#concept-element-namespace" title="concept-element-namespace">namespace</a> set to <var title="">namespace</var>,
+ <a href="#concept-element-namespace-prefix" title="concept-element-namespace-prefix">namespace prefix</a> set to <var title="">prefix</var>,
+ <a href="#concept-element-local-name" title="concept-element-local-name">local name</a> set to <var title="">localName</var>, and
+ <a href="#concept-node-document" title="concept-node-document">node document</a> set to the <a href="#context-object">context object</a>.
</ol>
<p>The

0 comments on commit 8469709

Please sign in to comment.