lib/kissy/5.0.0-alpha.3/build/util-debug.js
function (id, fn) {
            id = (id + EMPTY).match(RE_ID_STR)[1];
            var retryCount = 1;
            var timer = util.later(function () {
                    if (++retryCount > POLL_RETIRES) {
                        timer.cancel();
                        return;
                    }
                    var node = doc.getElementById(id);
                    if (node) {
                        fn(node);
                        timer.cancel();
                    }
                }, POLL_INTERVAL, true);
        }
function (id, fn) {
            id = (id + EMPTY).match(RE_ID_STR)[1];
            var retryCount = 1;
            var timer = util.later(function () {
                    if (++retryCount > POLL_RETIRES) {
                        timer.cancel();
                        return;
                    }
                    var node = doc.getElementById(id);
                    if (node) {
                        fn(node);
                        timer.cancel();
                    }
                }, POLL_INTERVAL, true);
        }
function ( id , fn ) { id = ( id + EMPTY ) . match ( RE_ID_STR ) [ 1 ] ; var retryCount = 1 ; var timer = util . later ( function ( ) { if ( ++ retryCount > POLL_RETIRES ) { timer . cancel ( ) ; return ; } var node = doc . getElementById ( id ) ; if ( node ) { fn ( node ) ; timer . cancel ( ) ; } } , POLL_INTERVAL , true ) ; }
Executes the supplied callback when the item with the supplied id is found.
@param id {String} The id of the element, or an array of ids to look for.
@param fn {Function} What to execute when the element is found.
@member KISSY
Executes the supplied callback when the item with the supplied id is found .