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

Function jqLiteOff

test/angular/1.2/angular.js:2402–2425  ·  view source on GitHub ↗
(element, type, fn, unsupported)

Source from the content-addressed store, hash-verified

2400}
2401
2402function jqLiteOff(element, type, fn, unsupported) {
2403 if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');
2404
2405 var events = jqLiteExpandoStore(element, 'events'),
2406 handle = jqLiteExpandoStore(element, 'handle');
2407
2408 if (!handle) return; //no listeners registered
2409
2410 if (isUndefined(type)) {
2411 forEach(events, function(eventHandler, type) {
2412 removeEventListenerFn(element, type, eventHandler);
2413 delete events[type];
2414 });
2415 } else {
2416 forEach(type.split(' '), function(type) {
2417 if (isUndefined(fn)) {
2418 removeEventListenerFn(element, type, events[type]);
2419 delete events[type];
2420 } else {
2421 arrayRemove(events[type] || [], fn);
2422 }
2423 });
2424 }
2425}
2426
2427function jqLiteRemoveData(element, name) {
2428 var expandoId = element.ng339,

Callers 1

jqLiteRemoveDataFunction · 0.70

Calls 6

isDefinedFunction · 0.70
jqLiteExpandoStoreFunction · 0.70
isUndefinedFunction · 0.70
forEachFunction · 0.70
arrayRemoveFunction · 0.70
removeEventListenerFnFunction · 0.50

Tested by

no test coverage detected