Live data from Hacker News

X-Tag - a cross-browser web components library

mozilla.github.com

11–20 of 54 posts

Re: X-Tag - a cross-browser web components library

#12
post #8

Isn't there a risk of conflict with elements introduced in future versions of HTML?

New tags are given an "x-" prefix by default, so that's not an issue. That said, you can opt out of the prefixing by changing the namespace string - but even if you remove it and there is a tag created down the road of that name, it doesn't mean your stuff is sure to break.

Re: X-Tag - a cross-browser web components library

#13
post #8

Isn't there a risk of conflict with elements introduced in future versions of HTML?

It looks like you have to prefix the tag names you register with an x- in your html.

The prefix is added as a default, but can be changed or even removed - it's up to you, the developer.

Re: X-Tag - a cross-browser web components library

#14

Why won't the poly fill work in IE9

Because it doesn't support CSS Animations, which I use for insertion detection. I might be able to finagle it for IE9 with Mutation events, but in their DOM Level 3 state, they destroy performance. IE10 supports CSS Animations and will also be the first IE version to support HTML5 Windows apps, those are the two most significant reasons it is the current minimum version for IE. If IE9 is the thing people really need,…

This really makes me sad. Mutation events gets you to IE9 but not 8, which means this cannot be used for enterprise apps. I'll start using it in personal projects though. Love the work.

Re: X-Tag - a cross-browser web components library

#15

Earlier quoted context omitted.

Because it doesn't support CSS Animations, which I use for insertion detection. I might be able to finagle it for IE9 with Mutation events, but in their DOM Level 3 state, they destroy performance. IE10 supports CSS Animations and will also be the first IE version to support HTML5 Windows apps, those are the two most significant reasons it is the current minimum version for IE. If IE9 is the thing people really need,…

This really makes me sad. Mutation events gets you to IE9 but not 8, which means this cannot be used for enterprise apps. I'll start using it in personal projects though. Love the work.

Yeah the funny thing is I could actually even make it work in IE6 and 7 if I used Mutation for IE9 and then - ready your pitchforks and torches folks - proprietary CSS Behavior script ducks to avoid tomato. IE8 screwed the pooch in this regard - they removed CSS Behaviors but failed to implement anything that could be used to do the same sort of thing.

Re: X-Tag - a cross-browser web components library

#18
The steps seem pretty dishonest to me. Correct me if i'm wrong, but these are the real X-Tag steps:

1. Scour the web for a plugin 2. Add the plugin script include to your page 3. Copy/Type the new HTML tag 4. Customise the plugin with your own behavior 5. Wash, Rinse, & Repeat

Re: X-Tag - a cross-browser web components library

#19
post #18

The steps seem pretty dishonest to me. Correct me if i'm wrong, but these are the real X-Tag steps: 1. Scour the web for a plugin 2. Add the plugin script include to your page 3. Copy/Type the new HTML tag 4. Customise the plugin with your own behavior 5. Wash, Rinse, & Repeat

1) Mozilla is generating a stock set of components that you wont have to "scour" for. 2) The components can be easily included using an app bootstrap builder that the Mozilla Marketplace dev hub will feature 3) You write the tags like you would any other in HTML, there is not complex copy or paste operation... 4) You can use components without modifying them, #4 is a red herring

Another huge benefit: the polyfill is 2k compressed composed of pure, library-independent JS

Re: X-Tag - a cross-browser web components library

#20
post #18

The steps seem pretty dishonest to me. Correct me if i'm wrong, but these are the real X-Tag steps: 1. Scour the web for a plugin 2. Add the plugin script include to your page 3. Copy/Type the new HTML tag 4. Customise the plugin with your own behavior 5. Wash, Rinse, & Repeat

[deleted]
Post reply on HN