function KeyUpEventDelay(inputElement, timeoutMs) {
        var instance = this;
        this.component = inputElement;
        this.originalHandler = inputElement.onkeyup;
        this.timeout = timeoutMs;
        this.timer = 0;

        this.delay = function(event) {
        	// Reschedule (prevent) any existing timeout to the original handler and schedule a new one
            window.clearTimeout(instance.timer);
            instance.timer = window.setTimeout(function() { instance.originalHandler.call(instance.component, event); }, instance.timeout);
        };
        
        if (this.originalHandler) {
        	this.component.onkeyup = this.delay;
        }
    }
/**
     * Delays "onkeyup" event handler invocation while additional events are triggered.
     * 
     * @param inputElement the element to wrap the onkeyup handler for
     * @param timeoutMs delay in milliseconds
     */
Delays "onkeyup" event handler invocation while additional events are triggered.

@param inputElement the element to wrap the onkeyup handler for
@param timeoutMs delay in milliseconds
Delays " onkeyup " event handler invocation while additional events are triggered . @param inputElement the element to wrap the onkeyup handler for @param timeoutMs delay in milliseconds
function KeyUpEventDelay(inputElement, timeoutMs) {
        var instance = this;
        this.component = inputElement;
        this.originalHandler = inputElement.onkeyup;
        this.timeout = timeoutMs;
        this.timer = 0;
        this.delay = function(event) {
            window.clearTimeout(instance.timer);
            instance.timer = window.setTimeout(function() { instance.originalHandler.call(instance.component, event); }, instance.timeout);
        };
        if (this.originalHandler) {
        	this.component.onkeyup = this.delay;
        }
    }
function KeyUpEventDelay ( inputElement , timeoutMs ) { var instance = this ; this . component = inputElement ; this . originalHandler = inputElement . onkeyup ; this . timeout = timeoutMs ; this . timer = 0 ; this . delay = function ( event ) { window . clearTimeout ( instance . timer ) ; instance . timer = window . setTimeout ( function ( ) { instance . originalHandler . call ( instance . component , event ) ; } , instance . timeout ) ; } ; if ( this . originalHandler ) { this . component . onkeyup = this . delay ; } }
Delays "onkeyup" event handler invocation while additional events are triggered.
Delays " onkeyup " event handler invocation while additional events are triggered .
// Reschedule (prevent) any existing timeout to the original handler and schedule a new one