W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2004

[whatwg] template element?

From: fantasai <fantasai.lists@inkedblade.net>
Date: Wed, 28 Jul 2004 22:59:24 +0200
Message-ID: <410813AC.9080503@inkedblade.net>
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
Received on Wednesday, 28 July 2004 13:59:24 UTC

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