Debian Codegraph @

closure-library/closure/goog/events/eventwrapper.js

raw
1 // Copyright 2009 The Closure Library Authors. All Rights Reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS-IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 /**
16 * @fileoverview Definition of the goog.events.EventWrapper interface.
17 *
18 * @author [email protected] (Emil A Eklund)
19 */
20
21 goog.provide('goog.events.EventWrapper');
22
23
24
25 /**
26 * Interface for event wrappers.
27 * @interface
28 */
29 goog.events.EventWrapper = function() {};
30
31
32 /**
33 * Adds an event listener using the wrapper on a DOM Node or an object that has
34 * implemented {@link goog.events.EventTarget}. A listener can only be added
35 * once to an object.
36 *
37 * @param {goog.events.ListenableType} src The node to listen to events on.
38 * @param {function(?):?|{handleEvent:function(?):?}|null} listener Callback
39 * method, or an object with a handleEvent function.
40 * @param {boolean=} opt_capt Whether to fire in capture phase (defaults to
41 * false).
42 * @param {Object=} opt_scope Element in whose scope to call the listener.
43 * @param {goog.events.EventHandler=} opt_eventHandler Event handler to add
44 * listener to.
45 */
46 goog.events.EventWrapper.prototype.listen = function(
47 src, listener, opt_capt, opt_scope, opt_eventHandler) {};
48
49
50 /**
51 * Removes an event listener added using goog.events.EventWrapper.listen.
52 *
53 * @param {goog.events.ListenableType} src The node to remove listener from.
54 * @param {function(?):?|{handleEvent:function(?):?}|null} listener Callback
55 * method, or an object with a handleEvent function.
56 * @param {boolean=} opt_capt Whether to fire in capture phase (defaults to
57 * false).
58 * @param {Object=} opt_scope Element in whose scope to call the listener.
59 * @param {goog.events.EventHandler=} opt_eventHandler Event handler to remove
60 * listener from.
61 */
62 goog.events.EventWrapper.prototype.unlisten = function(
63 src, listener, opt_capt, opt_scope, opt_eventHandler) {};