MCPcopy Create free account
hub / github.com/cafebazaar/blacksmith / jqLiteOff

Function jqLiteOff

web/static/bower_components/angular/angular.js:2809–2839  ·  view source on GitHub ↗
(element, type, fn, unsupported)

Source from the content-addressed store, hash-verified

2807}
2808
2809function jqLiteOff(element, type, fn, unsupported) {
2810 if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');
2811
2812 var expandoStore = jqLiteExpandoStore(element);
2813 var events = expandoStore && expandoStore.events;
2814 var handle = expandoStore && expandoStore.handle;
2815
2816 if (!handle) return; //no listeners registered
2817
2818 if (!type) {
2819 for (type in events) {
2820 if (type !== '$destroy') {
2821 removeEventListenerFn(element, type, handle);
2822 }
2823 delete events[type];
2824 }
2825 } else {
2826 forEach(type.split(' '), function(type) {
2827 if (isDefined(fn)) {
2828 var listenerFns = events[type];
2829 arrayRemove(listenerFns || [], fn);
2830 if (listenerFns && listenerFns.length > 0) {
2831 return;
2832 }
2833 }
2834
2835 removeEventListenerFn(element, type, handle);
2836 delete events[type];
2837 });
2838 }
2839}
2840
2841function jqLiteRemoveData(element, name) {
2842 var expandoId = element.ng339;

Callers 1

jqLiteRemoveDataFunction · 0.85

Calls 5

isDefinedFunction · 0.85
jqLiteExpandoStoreFunction · 0.85
removeEventListenerFnFunction · 0.85
forEachFunction · 0.85
arrayRemoveFunction · 0.85

Tested by

no test coverage detected