  <script>
    window.defineTestElement = function(name, connected) {
      var template = document.querySelector('#' + name);
      // es5 compat class
      function Klass() {
        const self = (window.Reflect && Reflect.construct)
          ? Reflect.construct(HTMLElement, [], this.constructor || Klass)
          : HTMLElement.call(this);
        return self;
      }

      Klass.prototype = Object.create(HTMLElement.prototype, {
        'constructor': {
          value: Klass,
          configurable: