function getGetter(name, kind) {
    switch (kind) {
      case PropertyKind.JS:
        let privateName = name + '_';
        let attributeName = null;
        return function () {
          return this[privateName];
        };
      case PropertyKind.ATTR:
        attributeName = getAttributeName(name);
        return function () {
          return this.getAttribute(attributeName);
        };
      case PropertyKind.BOOL_ATTR:
        attributeName = getAttributeName(name);
        return function () {
          return this.hasAttribute(attributeName);
        };
    }
  }
Helper function for defineProperty that returns the getter to use for the
property.
@param {string} name The name of the property.
@param {cr.PropertyKind} kind The kind of the property.
@return {function():*} The getter for the property.