function attachTCHandler (who, host, id, delay) {
    // If we're changing something, remove the pre-existing listener, and create a new one.
    // Note that the problems with valueChange's detach stuff come back to bite me here,
    // so I have to be careful to only ever use handle.detach() and Y.on to attach it,
    // Not Node.on or Node.detach!
    if (
        (HANDLE in PRIVATE[id]) &&
        PRIVATE[id][HANDLE].detach
    ) {
        // if there's already a handle, and the keyDelay is the same,
        // then there's nothing to do.  Just leave it as-is.
        if (delay === who.get("keyDelay")) {
            return;
        }
        // the keyDelay is changing, which means that we need to delete this handler,
        // and assign a new one.
        PRIVATE[id][HANDLE].detach();
    }
    // store a private reference to the event handle.
    PRIVATE[id][HANDLE] = Y.on(
        "valueChange",
        tcHandler,
        Y.one(host),
        who,
        { delay : delay }
    );
}
/**
 * <p>Attach a new valueChange event handler if necessary, possibly removing the old one
 * if the delay value is changing.</p>
 *
 * @private
 * @param who {Object} The plugin object.
 * @param host {Object} The node that we're plugged into.
 * @param id {String} The stamp on the plugin
 * @param delay {Number} The keyDelay value to use with the valueChange event.
 **/
Attach a new valueChange event handler if necessary, possibly removing the old one
if the delay value is changing.

@private
@param who {Object} The plugin object.
@param host {Object} The node that we're plugged into.
@param id {String} The stamp on the plugin
@param delay {Number} The keyDelay value to use with the valueChange event.
Attach a new valueChange event handler if necessary possibly removing the old one if the delay value is changing . @private @param who { Object } The plugin object . @param host { Object } The node that we ' re plugged into . @param id { String } The stamp on the plugin @param delay { Number } The keyDelay value to use with the valueChange event .
function attachTCHandler (who, host, id, delay) {
    if (
        (HANDLE in PRIVATE[id]) &&
        PRIVATE[id][HANDLE].detach
    ) {
        if (delay === who.get("keyDelay")) {
            return;
        }
        PRIVATE[id][HANDLE].detach();
    }
    PRIVATE[id][HANDLE] = Y.on(
        "valueChange",
        tcHandler,
        Y.one(host),
        who,
        { delay : delay }
    );
}
function attachTCHandler ( who , host , id , delay ) { if ( ( HANDLE in PRIVATE [ id ] ) && PRIVATE [ id ] [ HANDLE ] . detach ) { if ( delay === who . get ( "keyDelay" ) ) { return ; } PRIVATE [ id ] [ HANDLE ] . detach ( ) ; } PRIVATE [ id ] [ HANDLE ] = Y . on ( "valueChange" , tcHandler , Y . one ( host ) , who , { delay : delay } ) ; }
<p>Attach a new valueChange event handler if necessary, possibly removing the old one
 if the delay value is changing.</p>
<p > Attach a new valueChange event handler if necessary possibly removing the old one if the delay value is changing . < / p >
// If we're changing something, remove the pre-existing listener, and create a new one. // Note that the problems with valueChange's detach stuff come back to bite me here, // so I have to be careful to only ever use handle.detach() and Y.on to attach it, // Not Node.on or Node.detach! // if there's already a handle, and the keyDelay is the same, // then there's nothing to do.  Just leave it as-is. // the keyDelay is changing, which means that we need to delete this handler, // and assign a new one. // store a private reference to the event handle.