W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2006

[whatwg] The IMG element, proposing a CAPTION attribute

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Tue, 21 Nov 2006 16:39:52 +1100
Message-ID: <45629128.8050604@lachy.id.au>
Andrew Fedoniouk wrote:
> E.g. the engine allows to define following:
> <select id="color-selector">
>   <popup>
>      <table>
>         <tr>
>             <td role="option" value="#00FF00">...
>             <td role="option" value="#0000FF">...
>         </tr>
>      </table>
>  </popup>
> </select>
> 
> to be able to define something like this:
> http://www.terrainformatica.com/sciter/screenshots/color-chooser.png
> http://www.terrainformatica.com/htmlayout/images/selects3.jpg

A better way to implement that without embedding presentational markup 
in the HTML would be to use an XBL template, bound to  an ordinary 
select element.  You could write all the markup you need to render the 
colour chooser or periodic table in the XBL <template>, which is 
populated by the values from the <option> elements.  That has the 
advantage of providing better fallback in legacy UAs.

-- 
Lachlan Hunt
http://lachy.id.au/
Received on Monday, 20 November 2006 21:39:52 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:49 UTC