&& parent != this) {
        // Use logical parentnode, or native ShadowRoot host.
        parent = Polymer.dom(parent).parentNode || parent.host;

        // Check if the parent was registered and submittable.
        if (parent && parent.name && parent._parentForm === this) {
          return true;
        }
      }
      return false;
    }

  });

</script>
