rem: var element = OpenLayers.Util.getElement(elementParam); if (!element) return;  useCapture = useCapture || false;  if (name == 'keypress' && (navigator.appVersion.match(/Konqueror|Safari|KHTML/) || element.detachEvent)) name = 'keydown';   var elementObservers = OpenLayers.Event.observers[element.id]; if (elementObservers) { var entry = [name, observer, useCapture];   for (var i = 0; i < elementObservers.length; i++) { var cacheEntry = elementObservers[i];   var sameEntry = true; for (var j = 0; j < entry.length; j++) { if (entry[j] != cacheEntry[j]) { sameEntry = false; break; 
add: var foundEntry = false; var element = OpenLayers.Util.getElement(elementParam); if (element) {  useCapture = useCapture || false;  if (name == 'keypress') { if ( navigator.appVersion.match(/Konqueror|Safari|KHTML/) || element.detachEvent) { name = 'keydown'; 
context:   stopObserving: function(elementParam, name, observer, useCapture) {    var element = OpenLayers.Util.getElement(elementParam);    if (!element) return;    useCapture = useCapture || false;    if (name == 'keypress' &&        (navigator.appVersion.match(/Konqueror|Safari|KHTML/)        || element.detachEvent))      name = 'keydown';    // find element's entry in this.observers cache and remove it    var elementObservers = OpenLayers.Event.observers[element.id];    if (elementObservers) {        var entry = [name, observer, useCapture];        // find the specific event type in the element's list        for (var i = 0; i < elementObservers.length; i++) {            var cacheEntry = elementObservers[i];                        //compare all 3 elements of entry with observer            var sameEntry = true;                    for (var j = 0; j < entry.length; j++) {                if (entry[j] != cacheEntry[j]) {                    sameEntry = false;                    break;                }            }                //if we've found it, remove it from the observers array            if (sameEntry) {                elementObservers.splice(i--, 1);                if (elementObservers.length == 0) {                    OpenLayers.Event.observers[element.id] = null;                }                break;             }        }    }    //actually remove the event listener from browser    if (element.removeEventListener) {      element.removeEventListener(name, observer, useCapture);    } else if (element && element.detachEvent) {      element.detachEvent('on' + name, observer);    }  }
meta: 1027	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1027/a07a4c309deb95919663e2189911fb0163684cea/Events.js/clean/lib/OpenLayers/Events.js