[whatwg] <repeat>

Dean Edwards dean at edwards.name
Fri Jun 25 03:58:22 PDT 2004


the <repeat> element seems to be the source of some controversy.

whenever i have had to implement things like the repetition model in the 
past (it's always been tables), i put some constraints on the table. 
i.e. minRows and maxRows. there is no need for a <repeat> element in 
this model as the table will dynamically maintain it's size. the 
<repeat> element is effectively padding. another advantage of this 
approach is that you can constrain the size of the table in both directions:

1) an associated <input type="add"> is automatically disabled when you 
hit maxRows
2) tables can pad themselves with extra rows when data rows are deleted.

so, as an alternative to the <repeat> tag, could we just add some 
constraints to the repetition template? min/maxRepeats?

-dean






More information about the whatwg mailing list