On Sun, May 17, 2015 at 1:54 AM, Maciej Stachowiak <m...@apple.com> wrote:
> > (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. > (replying to a now even more older thread) FWIW, I like both of the approaches and would like to figure out a way to move forward with these. I personally slightly prefer the isolated imports approach a bit better, because some of the sugar in it (like prefix-renaming) is actually something the non-isolated imports might use as well. :DG<