(element, type, fn, unsupported)
| 2398 | } |
| 2399 | |
| 2400 | function 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 | |
| 2425 | function jqLiteRemoveData(element, name) { |
| 2426 | var expandoId = element.ng339, |
no test coverage detected