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

Re: [components] Isolated Imports and Foreign Custom Elements

From: Maciej Stachowiak <mjs@apple.com>
Date: Sun, 17 May 2015 01:54:38 -0700
Cc: WebApps WG <public-webapps@w3.org>
Message-id: <98E2E094-BE77-4DD1-8A16-FEBF41A39289@apple.com>
To: Anne van Kesteren <annevk@annevk.nl>

(Replying to slightly old thread.)

> Another thing that might be nice is that if these elements are that
> much isolated, perhaps we can consider allowing them to be renamed
> them as well, similar to what module systems allow you to do.

An earlier version of my proposal had support for arbitrary renaming at import time. However, Ryosuke convinced me that the syntax was confusing, and that importing with a different prefix would always be sufficient to resolve namespace collisions. That’s what the proposed prefix attribute is for. Thus, you can import "abc-button" as "xyz-button" but arbitrary other renames are not supported. This relies on the requirement that custom element names must contain a hyphen, and the convention that the bit before the hyphen is often treated as a namespace prefix. If there are good use cases for arbitrary renames, it’s probably not too hard to support them.

Received on Sunday, 17 May 2015 08:55:07 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:31 UTC