Ian Bicking: the old part of his blog

Repetition javascript library comment 000

The spec does specify events, which this library doesn't do -- I don't understand Javascript events that much at the moment. I actually followed this post up with a post to the whatwg list where I mention this problem. Hopefully some resolution will come up for this; though as I was writing it occurred to me that it's not too hard to fix by putting in a field like this in the template:

<div repeat="template" id="foo">
  <input type="hidden" name="foo-order" value="[foo]">

Then foo-order will contain an ordered list of the indexes -- the spec specifically indicates that all attributes are substituted, not just input names. So if you don't think of index as representing order -- just some relatedness -- it's not so bad. I think this is a reasonable way to handle it, the more I think about it, and it's definitely something I can add to variable_decode (so it orders the lists for you).

Comment on Re: Repetition Javascript Library
by Ian Bicking