MCPcopy Create free account
hub / github.com/bclinkinbeard/angular / jqLiteOff

Function jqLiteOff

test/fixtures/foo.js:2400–2423  ·  view source on GitHub ↗
(element, type, fn, unsupported)

Source from the content-addressed store, hash-verified

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

Callers 1

jqLiteRemoveDataFunction · 0.85

Calls 5

isDefinedFunction · 0.85
jqLiteExpandoStoreFunction · 0.85
isUndefinedFunction · 0.85
forEachFunction · 0.85
arrayRemoveFunction · 0.85

Tested by

no test coverage detected