MCPcopy Create free account
hub / github.com/breck7/scroll / on

Function on

external/.scrollLibs.js:1936–1945  ·  view source on GitHub ↗
(emitter, type, f)

Source from the content-addressed store, hash-verified

1934 var noHandlers = []
1935
1936 var on = function (emitter, type, f) {
1937 if (emitter.addEventListener) {
1938 emitter.addEventListener(type, f, false)
1939 } else if (emitter.attachEvent) {
1940 emitter.attachEvent("on" + type, f)
1941 } else {
1942 var map$$1 = emitter._handlers || (emitter._handlers = {})
1943 map$$1[type] = (map$$1[type] || noHandlers).concat(f)
1944 }
1945 }
1946
1947 function getHandlers(emitter, type) {
1948 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
.scrollLibs.jsFile · 0.70
fromTextAreaFunction · 0.70

Calls 1

concatMethod · 0.80

Tested by

no test coverage detected