RichText/Archived/Rooster/Rooster.gcomp/Support/node_modules/roosterjs/dist/rooster-amd.js
/**
 * Gets the cached event data by cache key from event object if there is already one.
 * Otherwise, call getter function to create one, and cache it.
 * @param event The event object
 * @param key Cache key string, need to be unique
 * @param getter Getter function to get the object when it is not in cache yet
 */
Gets the cached event data by cache key from event object if there is already one.
Otherwise, call getter function to create one, and cache it.
@param event The event object
@param key Cache key string, need to be unique
@param getter Getter function to get the object when it is not in cache yet
Gets the cached event data by cache key from event object if there is already one . Otherwise call getter function to create one and cache it . @param event The event object @param key Cache key string need to be unique @param getter Getter function to get the object when it is not in cache yet
function cacheGetEventData(event, key, getter) {
    var result = event && event.eventDataCache && event.eventDataCache.hasOwnProperty(key)
        ? event.eventDataCache[key]
        : getter();
    if (event) {
        event.eventDataCache = event.eventDataCache || {};
        event.eventDataCache[key] = result;
    }
    return result;
}
function cacheGetEventData ( event , key , getter ) { var result = event && event . eventDataCache && event . eventDataCache . hasOwnProperty ( key ) ? event . eventDataCache [ key ] : getter ( ) ; if ( event ) { event . eventDataCache = event . eventDataCache || { } ; event . eventDataCache [ key ] = result ; } return result ; }
Gets the cached event data by cache key from event object if there is already one.
Gets the cached event data by cache key from event object if there is already one .