MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / on

Function on

libs/leaflet/leaflet-src.js:2715–2730  ·  view source on GitHub ↗
(obj, types, fn, context)

Source from the content-addressed store, hash-verified

2713 // @function on(el: HTMLElement, eventMap: Object, context?: Object): this
2714 // Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`
2715 function on(obj, types, fn, context) {
2716
2717 if (types && typeof types === 'object') {
2718 for (var type in types) {
2719 addOne(obj, type, types[type], fn);
2720 }
2721 } else {
2722 types = splitWords(types);
2723
2724 for (var i = 0, len = types.length; i < len; i++) {
2725 addOne(obj, types[i], fn, context);
2726 }
2727 }
2728
2729 return this;
2730 }
2731
2732 var eventsKey = '_leaflet_events';
2733

Callers 4

leaflet-src.jsFile · 0.70
disableImageDragFunction · 0.70
preventOutlineFunction · 0.70
disableClickPropagationFunction · 0.70

Calls 2

addOneFunction · 0.85
splitWordsFunction · 0.85

Tested by

no test coverage detected