W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2012

[webcomponents] Use x:: instead of x-?

From: Kornel Lesiński <kornel@geekhood.net>
Date: Wed, 09 May 2012 21:25:29 +0100
To: public-webapps@w3.org
Message-ID: <op.wd15ord5te2ec8@aimac.local>
<x-bikeshed>


Would it be possible to use "::" instead of the "x-" prefix in custom  
element names? i.e. allow any name as long as it contains "::" somewhere:

<foo::bar>

or

<button is="foo::bar">


1. The "::" is used for pseudo-elements in CSS, and for namespaces in C++,  
both of which seem somewhat related.

2. "x-" is (subjectively) ugly, and has been used for experimental  
extensions elsewhere. IMHO it's a bit of an eye-sore in the otherwise  
elegant design.

3. document.createElement('::foo') works. <foo::> parses (unfortunately  
<::foo> doesn't).


Use of "::" would naturally allow some namespacing of reusable components:

<jqueryui::widget>
</jqueryui::widget>

(not True Namespaces in the XML sense, but IMHO that's also a good thing).  
If I understand correctly, serialisation of "::" in XML isn't a problem,  
as XML documents could use the is="" attribute instead.

-- 
regards, Kornel Lesiński
Received on Wednesday, 9 May 2012 20:26:00 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:52 GMT