src/lib/base/component-manager.js
function decorateEvents(comp) {
    const prototype = /** @type {!Function} */(comp.constructor).prototype;

    if (prototype.__events) return;

    let events = {};

    if (prototype.events) {
        events = prototype.events;
    }

    Object.getOwnPropertyNames(prototype)
        .map(propertyName => handlerMethodPattern.exec(propertyName))
        .filter(x => x)
        .forEach(([methodName, eventType, eventTarget]) => {
            events[eventType] = events[eventType] || {};

            /** @suppress {checkTypes} */
            events[eventType][eventTarget] = comp[methodName];
        })

    prototype.__events = events;
}
function decorateEvents(comp) {
    const prototype = /** @type {!Function} */(comp.constructor).prototype;

    if (prototype.__events) return;

    let events = {};

    if (prototype.events) {
        events = prototype.events;
    }

    Object.getOwnPropertyNames(prototype)
        .map(propertyName => handlerMethodPattern.exec(propertyName))
        .filter(x => x)
        .forEach(([methodName, eventType, eventTarget]) => {
            events[eventType] = events[eventType] || {};

            /** @suppress {checkTypes} */
            events[eventType][eventTarget] = comp[methodName];
        })

    prototype.__events = events;
}
function decorateEvents ( comp ) { const prototype = /** @type {!Function} */ ( comp . constructor ) . prototype ; if ( prototype . __events ) return ; let events = { } ; if ( prototype . events ) { events = prototype . events ; } Object . getOwnPropertyNames ( prototype ) . map ( propertyName => handlerMethodPattern . exec ( propertyName ) ) . filter ( x => x ) . forEach ( ( [ methodName , eventType , eventTarget ] ) => { events [ eventType ] = events [ eventType ] || { } ; /** @suppress {checkTypes} */ events [ eventType ] [ eventTarget ] = comp [ methodName ] ; } ) prototype . __events = events ; }
Fills events object of given component class from method names that match event handler pattern.

@param {!Component} comp Component instance to decorate events for.
Fills events object of given component class from method names that match event handler pattern .