Re:X-Tag - a cross-browser web components library
by sixbrx on Friday June 15, 2012 @01:52PM
(#4117739)
Really neat. I must be living under a rock, but I never had heard of this before. It seems to bring a lot of the advantages of component-oriented development with it - just declare and go and the implementers will have taken care of the necessary wiring behind the scenes to make the components work. What I don't have a feel for though is what disadvantages it might bring from component oriented development - how easy for example would it be to change the style and/or behavior of the expanded component dom objects, in a way that the original developers never thought of, if need be? In any case, very cool and thanks for posting.
[ Parent
| on HN ]
Re:X-Tag - a cross-browser web components library
by dandonkulous on Friday June 15, 2012 @01:57PM
(#4117758)
To change the style and behavior, you just use the DOM as you normally would. You can access the inner DOM elements of a component with regular ol' JS and style them normally with CSS if exposed - but even if they were created as Shadow DOM elements (in browsers that support Shadow DOM), you can still style them with CSS ;)