<?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>18863</bug_id>
          
          <creation_ts>2012-09-12 22:11:13 +0000</creation_ts>
          <short_desc>[Custom]: Consider only restricting naming to contain a dash</short_desc>
          <delta_ts>2013-04-10 20:40:07 +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>FIXED</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>17103</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Dimitri Glazkov">dglazkov</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          <cc>danieljb2</cc>
    
    <cc>esprehn</cc>
    
    <cc>ian</cc>
    
    <cc>sjmiles</cc>
    
    <cc>sorvell</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>73728</commentid>
    <comment_count>0</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-09-12 22:11:13 +0000</bug_when>
    <thetext>&quot; The custom element name must start with a U+0078 LATIN SMALL LETTER X, followed by U+002D HYPHEN-MINUS&quot;

Why not just:
1) any name that contains a dash;
2) and hasn&apos;t been registered before?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77071</commentid>
    <comment_count>1</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-10-24 20:52:49 +0000</bug_when>
    <thetext>Daniel, WDYT?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77085</commentid>
    <comment_count>2</comment_count>
    <who name="Daniel Buchner">danieljb2</who>
    <bug_when>2012-10-25 05:08:05 +0000</bug_when>
    <thetext>I would go with &apos;x-&apos; for the following reasons:

1. Consistency in View Source browsing is important for discover/hack-ability.
2. Is there any chance HTML itself will ever have a native tag that contains a dash causing an issue in the future?
3. What is the benefit of enforcing only the presence of a dash? Why should we make the tokenizer/parse code more complex if it yields no significant benefits?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79860</commentid>
    <comment_count>3</comment_count>
    <who name="Scott Miles">sjmiles</who>
    <bug_when>2012-12-10 20:41:43 +0000</bug_when>
    <thetext>In a world with numerous custom components, the tag namespace will become a crowded place. 

Therefore, vendors are likely to prefix anyway, and it&apos;s much nicer to have:

  g-button
  jq-button
  yui-button

vs

  x-g-button
  x-jq-button
  x-yui-button

For that reason, I&apos;m very much in favor of eliding the &quot;x-&quot;.

Since there are no HTML tags that contain HYPHEN today, I hoping we can grab up this rule for custom components. 

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79874</commentid>
    <comment_count>4</comment_count>
    <who name="Daniel Buchner">danieljb2</who>
    <bug_when>2012-12-10 22:52:02 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; In a world with numerous custom components, the tag namespace will become a
&gt; crowded place. 
&gt; 
&gt; Therefore, vendors are likely to prefix anyway, and it&apos;s much nicer to have:
&gt; 
&gt;   g-button
&gt;   jq-button
&gt;   yui-button
&gt; 
&gt; vs
&gt; 
&gt;   x-g-button
&gt;   x-jq-button
&gt;   x-yui-button
&gt; 
&gt; For that reason, I&apos;m very much in favor of eliding the &quot;x-&quot;.
&gt; 
&gt; Since there are no HTML tags that contain HYPHEN today, I hoping we can grab
&gt; up this rule for custom components. 
&gt; 
&gt; Scott

I am not really a fan of this for a few reasons:

1. &lt;x-____&gt; is immediately recognizable to anyone viewing source, as opposed to scanning for a dash somewhere in a name

2. Do we really want to end up with this: &lt;-sometag&gt; or &lt;sometag-&gt;, if not, are we going to institute another restriction that the tag cannot begin or end with a dash?

3. Is namespacing for tag names really as much a concern as JS variables? I would argue that it isn&apos;t, because 99% of the time you know what tags are included in your app.

4. The Firefox implementation is basically 3 feet from touching down on the tarmac, and though this isn&apos;t a huge change (I&apos;m guessing), is it really providing a significant value?

Let me know what you folks thing about the above.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79876</commentid>
    <comment_count>5</comment_count>
    <who name="Scott Miles">sjmiles</who>
    <bug_when>2012-12-10 23:14:45 +0000</bug_when>
    <thetext>My $0.02
 
&gt; 2. Do we really want to end up with this: &lt;-sometag&gt; or &lt;sometag-&gt;, if not,
&gt; are we going to institute another restriction that the tag cannot begin or
&gt; end with a dash?

I&apos;m of the mind that we don&apos;t need to worry about this. If some developer does this they will either have a good reason or they will be ridiculed.

&gt; 3. Is namespacing for tag names really as much a concern as JS variables? I
&gt; would argue that it isn&apos;t, because 99% of the time you know what tags are
&gt; included in your app.

Does this not conflict with your argument #1?

In any case, I&apos;m not sure what you mean. If YUI provides &quot;x-button&quot; and JQuery provides &quot;x-button&quot;, there goes the lovely interoperation we seek. Almost certainly it will become standard to prefix your tags. Then we have alphabet soup.

&gt; 4. is it really providing a significant value?

I know you need more opinions than just mine, but I still say yes.

S</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79883</commentid>
    <comment_count>6</comment_count>
    <who name="Daniel Buchner">danieljb2</who>
    <bug_when>2012-12-11 00:05:41 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; My $0.02
&gt;  
&gt; &gt; 2. Do we really want to end up with this: &lt;-sometag&gt; or &lt;sometag-&gt;, if not,
&gt; &gt; are we going to institute another restriction that the tag cannot begin or
&gt; &gt; end with a dash?
&gt; 
&gt; I&apos;m of the mind that we don&apos;t need to worry about this. If some developer
&gt; does this they will either have a good reason or they will be ridiculed.
&gt; 
&gt; &gt; 3. Is namespacing for tag names really as much a concern as JS variables? I
&gt; &gt; would argue that it isn&apos;t, because 99% of the time you know what tags are
&gt; &gt; included in your app.
&gt; 
&gt; Does this not conflict with your argument #1?
&gt; 
&gt; In any case, I&apos;m not sure what you mean. If YUI provides &quot;x-button&quot; and
&gt; JQuery provides &quot;x-button&quot;, there goes the lovely interoperation we seek.
&gt; Almost certainly it will become standard to prefix your tags. Then we have
&gt; alphabet soup.
&gt; 
&gt; &gt; 4. is it really providing a significant value?
&gt; 
&gt; I know you need more opinions than just mine, but I still say yes.
&gt; 
&gt; S

One last, real concern: are we 100% sure we&apos;ll never have an HTML element native to the spec that has dashes in it? If there was ever a natively-dashed tag name, would this create a problem?

All in all, I&apos;m not passionate about it - it&apos;s just another nit in the way of landing the patch in Firefox and a odd way of inferring that an element has super powers.

I&apos;m punting to Dimitri :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79884</commentid>
    <comment_count>7</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-12-11 00:10:16 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; 
&gt; I&apos;m punting to Dimitri :)

Oh crap.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79966</commentid>
    <comment_count>8</comment_count>
    <who name="Daniel Buchner">danieljb2</who>
    <bug_when>2012-12-11 21:53:06 +0000</bug_when>
    <thetext>I took a little time today to go around to a significant number of web devs in the office (not our low-level platform guys, the ones who work on sites and apps), and not one of them liked the idea of a random dash anywhere in the name being the magical indicator that something is a custom element. The immediately cited markup clarity and it that it &quot;seemed arbitrary&quot; like a &quot;magical dash&quot;. Not sure if that helps.

If we want the Firefox patch to land this week, we need a decision on this so I can get them to drop the code into the tree.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79974</commentid>
    <comment_count>9</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-12-11 22:45:33 +0000</bug_when>
    <thetext>(In reply to comment #8)
&gt; I took a little time today to go around to a significant number of web devs
&gt; in the office (not our low-level platform guys, the ones who work on sites
&gt; and apps), and not one of them liked the idea of a random dash anywhere in
&gt; the name being the magical indicator that something is a custom element. The
&gt; immediately cited markup clarity and it that it &quot;seemed arbitrary&quot; like a
&gt; &quot;magical dash&quot;. Not sure if that helps.
&gt; 
&gt; If we want the Firefox patch to land this week, we need a decision on this
&gt; so I can get them to drop the code into the tree.

This shouldn&apos;t block the patch. Since the &quot;-&quot; is less restrictive than &quot;^x-&quot;, we shouldn&apos;t stress about this too much right now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80212</commentid>
    <comment_count>10</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-12-14 22:45:31 +0000</bug_when>
    <thetext>I still think that this whole thing of allowing authors to just make up element names is a REALLY BAD IDEA. It&apos;s the whole XML fiasco all over again. People are just going to make up their own elements, with no fallback, no semantics, no way for search engines to know what&apos;s going on, no way for accessibility tools to work out what&apos;s going on, no way for older UAs to work out what&apos;s going on, no way to quickly swap out one widget set and swap in a new one, etc.

I really think this is the single biggest mistake of the Web Components work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80246</commentid>
    <comment_count>11</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-12-16 03:13:17 +0000</bug_when>
    <thetext>(In reply to comment #10)

&gt; I really think this is the single biggest mistake of the Web Components work.

This change was made as a response to bug 18669. Let&apos;s discuss it there. I reopened the bug. This bug is only talking about the constraints around the actual name of the custom element (whether it&apos;s a custom tag or an &quot;is&quot; attribute value).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85877</commentid>
    <comment_count>12</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-04-10 20:40:07 +0000</bug_when>
    <thetext>The spec has been updated to relax the name to have only dash a while back.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>