[whatwg] template element?
fantasai
fantasai.lists at inkedblade.net
Wed Jul 28 13:59:24 PDT 2004
The current repetition model adds four global attributes to every element:
repeat
repeat-start
repeat-min
repeat-max
If the repetition model continues to develop over the next few years, that
list will increase (e.g. by adding a way to group several templates to use
the same template index), and it's already unweildy. Imagine repeating a
form control. You might have to put attributes for name, type, value,
required, pattern, min, max, step, id, inputmode, onchange... as well as
repeat, repeat-start, repeat-min, repeat-max, and any others. Would it
perhaps make more sense to create a <template> element?
<template repeat-min="1" repeat-max="20" repeat-start="5">
<element/>
</template>
would be equivalent to
<element repeat="template" repeat-min="1" repeat-max="20" repeat-start="5"/>
and the repeat attribute will continue to be global. (It will no longer
be overloaded with the "template" value.)
~fantasai
--
http://fantasai.inkedblade.net/contact
More information about the whatwg
mailing list