<!DOCTYPE html>
<!--
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<html>
  <head>
    <title></title>
    <meta charset="UTF-8">
    <script src="../../MDV/mdv.js"></script>
  </head>
  <body>
    <template>
      <template bind="{{}}">
        Hello from {{source}}
      </template>
    </template>
    <!-- -->
    <script>
      // wait for some platforms (IE) to bootstrap <template>
      window.addEventListener('load', function() {
        var model = {
          source: 'MDV'
        };
        // does NOT make {{source}} go
        //HTMLTemplateElement.bindAllMustachesFrom_(document.body, model);
        //
        var t = document.body.querySelector('template');
        var i = t.createInstance();
        //
        // make {{source}} go
        HTMLTemplateElement.bindAllMustachesFrom_(i, model);
        // make {{source}} go
        //HTMLTemplateElement.bindAllMustachesFrom_(document.body, model);
        //
        document.body.appendChild(i);
        //
        // make {{source}} go
        //HTMLTemplateElement.bindAllMustachesFrom_(i, model);
        // make {{source}} go
        //HTMLTemplateElement.bindAllMustachesFrom_(document.body, model);
        //
        // needed for IE (why?)
        Model.notifyChanges();
      });
    </script>
  </body>
</html>
