OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** @fileoverview EventTracker is a simple class that manages the addition and | 5 /** @fileoverview EventTracker is a simple class that manages the addition and |
6 * removal of DOM event listeners. In particular, it keeps track of all | 6 * removal of DOM event listeners. In particular, it keeps track of all |
7 * listeners that have been added and makes it easy to remove some or all of | 7 * listeners that have been added and makes it easy to remove some or all of |
8 * them without requiring all the information again. This is particularly | 8 * them without requiring all the information again. This is particularly |
9 * handy when the listener is a generated function such as a lambda or the | 9 * handy when the listener is a generated function such as a lambda or the |
10 * result of calling Function.bind. | 10 * result of calling Function.bind. |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 * @param {EventTracker.Entry} h The entry describing the listener to remove. | 88 * @param {EventTracker.Entry} h The entry describing the listener to remove. |
89 * @private | 89 * @private |
90 */ | 90 */ |
91 EventTracker.removeEventListener_ = function(h) { | 91 EventTracker.removeEventListener_ = function(h) { |
92 h.node.removeEventListener(h.eventType, h.listener, h.capture); | 92 h.node.removeEventListener(h.eventType, h.listener, h.capture); |
93 }; | 93 }; |
94 | 94 |
95 return EventTracker; | 95 return EventTracker; |
96 })(); | 96 })(); |
97 | 97 |
OLD | NEW |