title: Publishing Custom Elements, naming conventions, best practices?
body: <p>I am about to make my Custom Element <code>&lt;card-t&gt;</code> public</p>
  
  <p>pre-release is at: <a href="https://github.com/card-ts/playingcardts" rel="nofollow noreferrer">https://github.com/card-ts/playingcardts</a></p>
  
  <p><strong>Suggestions and enhancements much appreciated!</strong></p>
  
  <p>Couple of questions:</p>
  
  <h3>Naming Custom Elements</h3>
  
  <p>There is: <a href="https://www.webcomponents.org/community/articles/how-should-i-name-my-element" rel="nofollow noreferrer">https://www.webcomponents.org/community/articles/how-should-i-name-my-element</a><br>
  but it doesn't get past "must include a hyphen"</p>
  
  <p>I went with <code>element.card-t.js</code> for sorting purposes.</p>
  
  <p>Other best practices ??</p>
  
  <h3>Wrapping in IIFE &amp; ES Modules?</h3>
  
  <p>The Custom Elements gets created in the Global Namespace, and doesn't return anything like a library does.</p>
  
  <p>Wrapping in an IIFE should be enough?</p>
  
  <p>Is there value in loading it as module?</p>
  
  <p><code>&lt;script type="module" src="element.card-t.js"&gt;</code></p>
  
  <h3>Extending Custom Elements</h3>
  
  <p>Should we by default return the class definition so extending is easier?</p>