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

[whatwg] repetition model

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 21 Jun 2004 12:44:17 +0000 (UTC)
Message-ID: <Pine.LNX.4.58.0406211125150.11589@dhalsim.dreamhost.com>
On Sun, 13 Jun 2004, Peter-Paul Koch wrote:
>>> now i have this "repeat" element. does it show up in the DOM?
>> It's well defined:
>>    http://whatwg.org/specs/web-forms/current-work/#repeat0
> Unfortunately it only shows up in Mozilla (getElementsByTagName('repeat'))

It shows up in IE6's DOM as well (which is what matters; the idea is to
make the other browsers support all this natively).

>> As soon as the <repeat> element is inserted into the document, whether
>> by being in the original markup or via scripting, a repetition block is
>> inserted into the DOM at the appropriate place, and the <repeat>
>> element is then removed.
> If by scripting we don't need the repeat tag.

True. But it's easier to say that it happens however the element is
inserted instead of special-casing load-time.

>>> can i do this?
>>>    document.createElement("repeat");
>>> will that throw an error?
>> You can do it and it won't cause an error. If you try to insert it into
>> the document using, e.g., appendChild(), then the element will be
>> replaced by a repetition block in the final DOM, as described in the
>> spec above.
> It causes an error only in Opera, but only Mozilla actually inserts the
> element. IE and Safari don't do anything.

Sorry, I thought the question was "can I do this in a compliant Web Forms
2 implementation", as opposed to current non-WF2 browsers.

In IE it seems to insert the element. Here's the test I used:

   var t = document.createElement('repeat');
   t.appendChild(document.createTextNode('[test element here]'));

> If you want Web Forms to be implementable right now (by JavaScript),
> you'll have to (temporarily?) redefine several elements as existing
> XHTML tags.

I don't think we necessarily need it implementable in JavaScript for
UAs like Mozilla and Opera; the idea is to get those to implement this
natively soon instead.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 21 June 2004 05:44:17 UTC

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