code: function setupEvent(classDef, eventName) {
    const camelEventName = Util.camelCase(eventName.replace(/^layer-/, ''));
    const callbackName = 'on' + camelEventName.charAt(0).toUpperCase() + camelEventName.substring(1);
    if (!classDef.properties[callbackName]) {
      classDef.properties[callbackName] = {
        type: Function,
        set(value) {
          if (this.properties['old-' + eventName]) {
            this.removeEventListener(eventName, this.properties['old-' + eventName]);
            this.properties['old-' + eventName] = null;
          }
          if (value) {
            this.addEventListener(eventName, value);
            this.properties['old-' + eventName] = value;
          }
        },
      };
    }
  }
docs: /*
  For each event defined in the `events` property, setup an `onXXX` property.
  
  The `onXXX` property works by:
  
  1. Doing nothing unless the app sets this event property to a Function
  2. Listening for the specified event via addEventListener
  3. Calling any provided function with the event provided by addEventListener
  4. Call removeEventListener should this property ever change
  
  @method setupEvent
  @private
  @param {Object} classDef
  @param {String} eventName