MCPcopy Index your code
hub / github.com/angular-ui/ui-grid / jqLiteOff

Function jqLiteOff

lib/test/angular/1.4.3/angular.js:2781–2811  ·  view source on GitHub ↗
(element, type, fn, unsupported)

Source from the content-addressed store, hash-verified

2779}
2780
2781function jqLiteOff(element, type, fn, unsupported) {
2782 if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');
2783
2784 var expandoStore = jqLiteExpandoStore(element);
2785 var events = expandoStore && expandoStore.events;
2786 var handle = expandoStore && expandoStore.handle;
2787
2788 if (!handle) return; //no listeners registered
2789
2790 if (!type) {
2791 for (type in events) {
2792 if (type !== '$destroy') {
2793 removeEventListenerFn(element, type, handle);
2794 }
2795 delete events[type];
2796 }
2797 } else {
2798 forEach(type.split(' '), function(type) {
2799 if (isDefined(fn)) {
2800 var listenerFns = events[type];
2801 arrayRemove(listenerFns || [], fn);
2802 if (listenerFns && listenerFns.length > 0) {
2803 return;
2804 }
2805 }
2806
2807 removeEventListenerFn(element, type, handle);
2808 delete events[type];
2809 });
2810 }
2811}
2812
2813function jqLiteRemoveData(element, name) {
2814 var expandoId = element.ng339;

Callers 1

jqLiteRemoveDataFunction · 0.70

Calls 5

isDefinedFunction · 0.70
jqLiteExpandoStoreFunction · 0.70
removeEventListenerFnFunction · 0.70
forEachFunction · 0.70
arrayRemoveFunction · 0.70

Tested by

no test coverage detected