<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>21204</bug_id>
          
          <creation_ts>2013-03-06 12:07:44 +0000</creation_ts>
          <short_desc>[Custom]: &quot;Custom tag wins&quot; policy can be inconsistent.</short_desc>
          <delta_ts>2013-03-07 01:34:55 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - Component Model</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>14968</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Morrita Hajime">morrita</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>84018</commentid>
    <comment_count>0</comment_count>
    <who name="Morrita Hajime">morrita</who>
    <bug_when>2013-03-06 12:07:44 +0000</bug_when>
    <thetext>Section4: &quot;If both types of custom element names are provided at the time of element&apos;s instantiation, the custom tag must win over the type extension.&quot;

Thinking about createElement() behavior:

Given this being defined:
&gt; var FooElement = document.register(
&gt;   &quot;x-foo&quot;, 
&gt;   { prototype: Object.create(HTMLDivElement.prototype) });

Question 1: What kind of element is created when calling this?

&gt; var foo = document.createElement(&quot;div&quot;, &quot;x-foo&quot;);

- 1a: &lt;x-foo&gt; of FooElement 
- 1b: &lt;div is=&quot;x-foo&quot;&gt; of FooElement

My reading (of Section 4) is 1b. This is fine, but...

Given an additional definition:

&gt; var BarElement = document.register(
&gt;   &quot;x-bar&quot;, { prototype: Object.create(FooElement.prototype) });

Question 2: What kind of element is created when calling this?

&gt; var bar = document.createElement(&quot;x-foo&quot;, &quot;x-bar&quot;);

- 2a: &lt;x-bar&gt; of BarElement
- 2b: &lt;x-foo is=&quot;x-bar&quot;&gt; of BarElement

My reading is 2b. But this contradicts the statement
&quot;the custom tag must win over the type extension&quot;.
It could be 2a by taking the statement.
In such case, the behavior is inconsistent to IMO.

Also, with same definitions..

Question 3: What kind of element is created when parsing this?

someDiv.innerHTML = &quot;&lt;x-foo is=&apos;x-bar&apos;&gt;&lt;/x-foo&gt;&quot;;

- 3a: &lt;x-foo is=&apos;x-bar&apos;&gt; of BarElement
- 3b: &lt;x-foo is=&quot;x-bar&quot;&gt; of FooElement

I&apos;m not sure which is correct.
3a seems natural. but it also contradicts &quot;custom tag wins&quot; rule.
3b matches the rule. But it is different from what createElement() is doing.

My feeling is that we can just drop &quot;custom tag wins&quot; rule.
Does this make sense? Or I misunderstand the spec?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84059</commentid>
    <comment_count>1</comment_count>
    <who name="Morrita Hajime">morrita</who>
    <bug_when>2013-03-07 01:34:55 +0000</bug_when>
    <thetext>Looks like I was confused. Closing.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>