(element, type, fn, unsupported)
| 2400 | } |
| 2401 | |
| 2402 | function 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 | |
| 2427 | function jqLiteRemoveData(element, name) { |
| 2428 | var expandoId = element.ng339, |
no test coverage detected