Re: ISSUE-41/ACTION-97 decentralized-extensibility

On Oct 23, 2009, at 6:01 PM, Maciej Stachowiak wrote:

>
> But now the content appears twice, both flat and in the sphere (plus  
> the author has to repeat it twice). You have to use script or UA- 
> specific content to get it right and use only the proper element.  
> But let's say we used a div with a magic attribute instead:
>
> <div -webkit-rotating-sphere -moz-rotating-sphere>
>    <img src="image1.png">
>    <p>Some text</p>
>     <img src="image2.jpg">
>    <video src="video.mp4">
> </div>
>
> Hey, no problem! We get one rotating sphere with four panels in the  
> browsers that support it, and (presumably) graceful fallback in  
> browsers that don't. Just as for CSS properties.

One thing I forgot to mention - an extension attribute is friendly to  
future standardization under a different name even if it becomes an  
element rather than an attribute. So for example you could do this, to  
support older WebKit & Gecko and newer standards-based browsers:

<div rotating-sphere -webkit-rotating-sphere -moz-rotating-sphere>
    <img src="image1.png">
    <p>Some text</p>
     <img src="image2.jpg">
    <video src="video.mp4">
</div>

Or if the standards process decides an element would be more  
appropriate, you could do this:

<rotating-sphere -webkit-rotating-sphere -moz-rotating-sphere>
    <img src="image1.png">
    <p>Some text</p>
     <img src="image2.jpg">
    <video src="video.mp4">
</div>

Thus, I think "vendor attributes" are a mechanism that's very friendly  
to future standardization and to multiple vendors experimenting with a  
feature. That's so even if the feature will someday be an element, and  
not an attribute.

Regards,
Maciej

Received on Saturday, 24 October 2009 01:38:46 UTC