This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 14967 - [Custom Elements]: Find a way to avoid "x-" prefix because it's ugly
Summary: [Custom Elements]: Find a way to avoid "x-" prefix because it's ugly
Status: RESOLVED DUPLICATE of bug 18669
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 18511
  Show dependency treegraph
 
Reported: 2011-11-28 22:39 UTC by Dimitri Glazkov
Modified: 2013-03-13 15:46 UTC (History)
4 users (show)

See Also:


Attachments

Description Dimitri Glazkov 2011-11-28 22:39:26 UTC
Here are several ideas:

* allow implicitly omitting the prefix in the attribute value
* put custom elements in a separate name space from the HTML elements, and use a flag indicator in declaration, either as part of extends attribute or as a separate flag attribute.
* specify the value of extends attribute as an explicit inheritance chain, thus narrowing the name space to the last-inherited value.
Comment 1 John Thomas 2012-01-24 04:48:37 UTC
Beyond ugliness, another reason to prefer non-dashed attributes is DOM Level 0 attribute-as-element-property access. Dashed attributes are unfriendly for that purpose
Comment 2 Dominic Cooney 2012-05-22 01:44:06 UTC
(In reply to comment #0)
> Here are several ideas:
> 
> * allow implicitly omitting the prefix in the attribute value

This seems very messy:

• It hurts grepping
• It is confusing when you want to extend a custom element; then you need to use the x-, presumably.
• It makes custom elements that start with x- really confusing (ie x-x-foo) because you have to guess which level of prefixing is going to be applied, etc.

> …
> * specify the value of extends attribute as an explicit inheritance chain, thus
> narrowing the name space to the last-inherited value.

Does this mean that if what a custom element extends changes, all of the elements that extend that one will break? That sounds tiresome.
Comment 3 Pierre Réveillon 2012-06-25 09:39:29 UTC
How to include specific elements from different web components libraries?
For example, I include all-in-one "iquery-ui.html" and "footools-library.html" component files, and both provides a custom element with the same name?

The CSS bindings used in XBL seems to be a lot more scalable: it lets the developer decide the way to bind element, and it allows to choose which element of which file he wants to use.
Comment 4 Dimitri Glazkov 2013-03-13 15:46:58 UTC
In bug 18669, we switched to only require a dash in the custom tag. Closing this bug. Please file bugs on other parts of the spec -- there are at least two comments that aren't relevant to this bug.

*** This bug has been marked as a duplicate of bug 18669 ***