MCPcopy Index your code
hub / github.com/DHTMLX/gantt / on

Function on

samples/common/codehighlight/codemirror.js:534–543  ·  view source on GitHub ↗
(emitter, type, f)

Source from the content-addressed store, hash-verified

532 var noHandlers = [];
533
534 var on = function(emitter, type, f) {
535 if (emitter.addEventListener) {
536 emitter.addEventListener(type, f, false);
537 } else if (emitter.attachEvent) {
538 emitter.attachEvent("on" + type, f);
539 } else {
540 var map = emitter._handlers || (emitter._handlers = {});
541 map[type] = (map[type] || noHandlers).concat(f);
542 }
543 };
544
545 function getHandlers(emitter, type) {
546 return emitter._handlers && emitter._handlers[type] || noHandlers

Callers 11

eventMixinFunction · 0.70
NativeScrollbarsFunction · 0.70
initScrollbarsFunction · 0.70
markTextFunction · 0.70
registerGlobalHandlersFunction · 0.70
showCrossHairFunction · 0.70
leftButtonStartDragFunction · 0.70
leftButtonSelectFunction · 0.70
registerEventHandlersFunction · 0.70
codemirror.jsFile · 0.70
fromTextAreaFunction · 0.70

Calls 1

attachEventMethod · 0.65

Tested by

no test coverage detected