<?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>25283</bug_id>
          
          <creation_ts>2014-04-07 11:07:21 +0000</creation_ts>
          <short_desc>[Custom]: Custom element names should not end with a hyphen</short_desc>
          <delta_ts>2014-05-05 17:58:19 +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>WONTFIX</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="Mathias Bynens">mathias</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          <cc>mathias</cc>
    
    <cc>mike</cc>
    
    <cc>nikeiwe</cc>
    
    <cc>public-webapps</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>103465</commentid>
    <comment_count>0</comment_count>
    <who name="Mathias Bynens">mathias</who>
    <bug_when>2014-04-07 11:07:21 +0000</bug_when>
    <thetext>Custom element names must contain a hyphen, so e.g. `foo` is invalid, but `foo-bar` is valid.

However, as per the current rules, e.g. `foo-` is valid too. IMHO it would make sense to tighten the requirement by disallowing trailing hyphens, thus making `foo-` invalid.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103466</commentid>
    <comment_count>1</comment_count>
    <who name="Mathias Bynens">mathias</who>
    <bug_when>2014-04-07 11:08:51 +0000</bug_when>
    <thetext>Similarly, how about disallowing consecutive hyphens? `foo----bar` is not really a nice element name.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103468</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2014-04-07 12:02:03 +0000</bug_when>
    <thetext>Nah, it&apos;d be nice if this test case was valid:

&lt;foo-- id=&quot;x&quot;/&gt;
&lt;script&gt;
x.innerHTML = &quot;&lt;/foo--&gt;&lt;!--&quot;; // wut
&lt;/script&gt;

(j/k)

But it&apos;s not clear to me what the point is. We don&apos;t disallow data----=&quot;&quot; either.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103469</commentid>
    <comment_count>3</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2014-04-07 12:04:31 +0000</bug_when>
    <thetext>I seem to remember Dimitri mentioning there&apos;s some library that&apos;s intentionally using custom element names with trailing hyphens.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103470</commentid>
    <comment_count>4</comment_count>
    <who name="Mykyta Semenistyi">nikeiwe</who>
    <bug_when>2014-04-07 14:08:46 +0000</bug_when>
    <thetext>I completely agree with Mathias, trailing hyphen or consecutive could cause a lot of confusion in naming, would be great to have these rules landed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103472</commentid>
    <comment_count>5</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2014-04-07 15:32:44 +0000</bug_when>
    <thetext>(In reply to Mathias Bynens from comment #0)
&gt; Custom element names must contain a hyphen, so e.g. `foo` is invalid, but
&gt; `foo-bar` is valid.
&gt; 
&gt; However, as per the current rules, e.g. `foo-` is valid too. IMHO it would
&gt; make sense to tighten the requirement by disallowing trailing hyphens, thus
&gt; making `foo-` invalid.

Can you help me understand what the problem is?

If it&apos;s just aesthetics, I would really like to avoid dictating such opinions in a spec.

For example, I quite like http://charbelrami.github.io/math-elements/ and don&apos;t see anything wrong with it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105060</commentid>
    <comment_count>6</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2014-05-05 17:58:19 +0000</bug_when>
    <thetext>Assuming no changes are necessary to the spec. Please reopen if you feel otherwise.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>