Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!doctype html>
  
<script src="http://www.polymer-project.org/platform.js"></script>
<link rel="import" href="http://www.polymer-project.org/components/polymer/polymer.html">
<polymer-element name="form-el">
  <template>
    <template repeat="{{wrappers}}">
      <div style="border: 2px solid orange; padding: 2px; margin: 4px">
        <content select="[key='{{}}']">
      </div>
    </template>
  </template>
  <script>
    Polymer({
      domReady: function() {
        this.updateWrappers();
      },
      updateWrappers: function() {
        this.wrappers = [];
        for (var i=0, n=this.firstChild; n; n=n.nextSibling) {
          if (n.setAttribute) {
            n.setAttribute('key', i);
            this.wrappers.push(i++)
          }
        }
      }
    });
  </script>
</polymer-element>
<form-el>
  <input label="name" type="text">
  <span>This must also be wrapped</span>
</form-el>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
sjmilespro
0viewers