(obj, type, fn, context, id)
| 2835 | } |
| 2836 | |
| 2837 | function removeOne(obj, type, fn, context, id) { |
| 2838 | id = id || type + stamp(fn) + (context ? '_' + stamp(context) : ''); |
| 2839 | var handler = obj[eventsKey] && obj[eventsKey][id]; |
| 2840 | |
| 2841 | if (!handler) { return this; } |
| 2842 | |
| 2843 | if (!Browser.touchNative && Browser.pointer && type.indexOf('touch') === 0) { |
| 2844 | removePointerListener(obj, type, handler); |
| 2845 | |
| 2846 | } else if (Browser.touch && (type === 'dblclick')) { |
| 2847 | removeDoubleTapListener(obj, handler); |
| 2848 | |
| 2849 | } else if ('removeEventListener' in obj) { |
| 2850 | |
| 2851 | obj.removeEventListener(mouseSubst[type] || type, handler, false); |
| 2852 | |
| 2853 | } else { |
| 2854 | obj.detachEvent('on' + type, handler); |
| 2855 | } |
| 2856 | |
| 2857 | obj[eventsKey][id] = null; |
| 2858 | } |
| 2859 | |
| 2860 | // @function stopPropagation(ev: DOMEvent): this |
| 2861 | // Stop the given event from propagation to parent elements. Used inside the listener functions: |
no test coverage detected