Skip to content

Commit

Permalink
Change createElement() namespace to match implementations
Browse files Browse the repository at this point in the history
Fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=19431.

See comments 12 and 20 there. Gecko tried switching to the spec's
current wording and immediately had to back out due to extension
breakage. It does not seem likely the current spec is implementable.
  • Loading branch information
ayg authored and annevk committed Apr 13, 2016
1 parent 01145a5 commit c8ae9cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4689,8 +4689,12 @@ invoked, must run these steps:
<li>If <var>is</var> is non-null and <var>definition</var> is null, then <a>throw</a> a
{{NotFoundError}}.

<li>Let <var>namespace</var> be the <a>HTML namespace</a>, if the <a>context object</a>'s
<a for=Document>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>creating an element</a> given the
<a>context object</a>, <var>localName</var>, null, the <a>HTML namespace</a>, <var>is</var>, and
<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.

<li>If <var>is</var> is non-null, then <a>set an attribute value</a> for <var>element</var> using
Expand Down
6 changes: 4 additions & 2 deletions dom.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<p data-fill-with="logo"><a class="logo" href="https://whatwg.org/"> <img alt="WHATWG" height="100" src="https://resources.whatwg.org/logo-dom.svg"> </a> </p>
<hgroup>
<h1 class="p-name no-ref allcaps" id="title">DOM</h1>
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Living Standard — Last Updated <time class="dt-updated" datetime="2016-04-11">11 April 2016</time></span></h2>
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Living Standard — Last Updated <time class="dt-updated" datetime="2016-04-13">13 April 2016</time></span></h2>
</hgroup>
<div data-fill-with="spec-metadata">
<dl>
Expand Down Expand Up @@ -2603,7 +2603,9 @@ <h3 class="heading settled" data-level="4.5" id="interface-document"><span class
such member exists.
<li>Let <var>definition</var> be the result of <a data-link-type="dfn" href="https://rawgit.com/w3c/webcomponents/15a203c8393aef0df7223ab1d43406aa11a7e71e/spec/custom/index.html#dfn-look-up-custom-element-definition">looking up a custom element definition</a>, given the <a data-link-type="dfn" href="#context-object">context object</a>, the <a data-link-type="dfn" href="#html-namespace">HTML namespace</a>, <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>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, the <a data-link-type="dfn" href="#html-namespace">HTML namespace</a>, <var>is</var>, and
<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>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

0 comments on commit c8ae9cb

Please sign in to comment.