title: What is the right way to remove and re-add a polymer element instance?
body: <p>Removing and re-adding a polymer element instance breaks the data bindings. Calling prepareElement() reconnects everything, but is this the best way?</p>
  
  <p>Given this HTML, using the <a href="https://www.dartlang.org/polymer-dart/#data-binding" rel="nofollow">click-counter example</a></p>
  
  
  
  <pre class="lang-dart prettyprint-override"><code>&lt;body&gt;           
    &lt;click-counter id="click_counter_id" count="5"&gt;&lt;/click-counter&gt;    
  &lt;/body&gt;
  </code></pre>
  
  <p>and the code</p>
  
  <pre class="lang-dart prettyprint-override"><code>main() {
    Logger.root.level = Level.ALL;
    Logger.root.onRecord.listen((LogRecord rec) {   
      print('${rec.loggerName}: ${rec.level.name}: ${rec.time}: ${rec.message}');
    });
  
    initPolymer().run(() {
  
      Polymer.onReady.then((_) {            
  
        var elem = querySelector('#click_counter_id');
        var parent = elem.parent;
  
        elem.remove();         
  
        new Timer(new Duration(seconds:1), () {
  
          parent.children.add(elem);
  
          // This reconnects the bindings. Is it correct?
          (elem as PolymerElement).prepareElement();
        });
      });
    });            
  }
  </code></pre>
  
  <p>everything <em>seems</em> ok. But then we get a warning logged:</p>
  
  <pre class="lang-dart prettyprint-override"><code>polymer.events: FINE: event: [button].on-click =&gt; [click-counter].increment())
  polymer.unbind: FINE: [click-counter] cancelUnbindAll
  polymer.unbind: WARNING: [click-counter] already unbound, cannot cancel unbindAll
  polymer.events: FINE: event: [button].on-click =&gt; [click-counter].increment())
  </code></pre>
  
  <p>Is there a better way to remove and re-add a polymer element instance?</p>