core/Repository.js
function find(predicate) {
        var key, elem;
        for (key in _idMap) {
            if (_idMap.hasOwnProperty(key)) {
                elem = _idMap[key];
                if (predicate(elem)) {
                    return elem;
                }
            }
        }
        return null;
    }
function find(predicate) {
        var key, elem;
        for (key in _idMap) {
            if (_idMap.hasOwnProperty(key)) {
                elem = _idMap[key];
                if (predicate(elem)) {
                    return elem;
                }
            }
        }
        return null;
    }
function find ( predicate ) { var key , elem ; for ( key in _idMap ) { if ( _idMap . hasOwnProperty ( key ) ) { elem = _idMap [ key ] ; if ( predicate ( elem ) ) { return elem ; } } } return null ; }
Find the first matched element satisfying the predicate.
@param {function(Element):boolean} predicate A function to filter elements.
@return {Element} A matched element.
Find the first matched element satisfying the predicate .