| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 4 | 2 | 2 | 0.984 | ExpressionStatement |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 4 | 223 | Closure/closure/goog/events/eventhandler.js |
| 2 | 4 | 307 | Closure/closure/goog/events/eventhandler.js |
| ||||
/**
* Adds an event listener with a specific event wrapper on a DOM Node or an
* object that has implemented {@link goog.events.EventTarget}. A listener can
* only be added once to an object.
*
* @param {EventTarget|goog.events.EventTarget} src The node to listen to
* events on.
* @param {goog.events.EventWrapper} wrapper Event wrapper to use.
* @param {Function|Object} listener Callback method, or an object with a
* handleEvent function.
* @param {boolean=} opt_capt Whether to fire in capture phase (defaults to
* false).
* @param {Object=} opt_handler Element in whose scope to call the listener.
* @return {goog.events.EventHandler} This object, allowing for chaining of
* calls.
*/
goog.events.EventHandler.prototype.listenWithWrapper= function (src, wrapper,
listener, opt_capt, opt_handler){
wrapper.listen(src, listener, opt_capt, opt_handler
|| this.handler_, this );
return this ;
} ;
|
| ||||
/**
* Removes an event listener which was added with listenWithWrapper().
*
* @param {EventTarget|goog.events.EventTarget} src The target to stop
* listening to events on.
* @param {goog.events.EventWrapper} wrapper Event wrapper to use.
* @param {Function|Object} listener The listener function to remove.
* @param {boolean=} opt_capt In DOM-compliant browsers, this determines
* whether the listener is fired during the capture or bubble phase of the
* event.
* @param {Object=} opt_handler Element in whose scope to call the listener.
* @return {goog.events.EventHandler} This object, allowing for chaining of
* calls.
*/
goog.events.EventHandler.prototype.unlistenWithWrapper= function (src, wrapper,
listener, opt_capt, opt_handler){
wrapper.unlisten(src, listener, opt_capt, opt_handler
|| this.handler_, this );
return this ;
} ;
|
| |||
/**
* Removes an event listener which was added with listenWithWrapper().
*
* @param {EventTarget|goog.events.EventTarget} src The target to stop
* listening to events on.
* @param {goog.events.EventWrapper} wrapper Event wrapper to use.
* @param {Function|Object} listener The listener function to remove.
* @param {boolean=} opt_capt In DOM-compliant browsers, this determines
* whether the listener is fired during the capture or bubble phase of the
* event.
* @param {Object=} opt_handler Element in whose scope to call the listener.
* @return {goog.events.EventHandler} This object, allowing for chaining of
* calls.
*/
/**
* Adds an event listener with a specific event wrapper on a DOM Node or an
* object that has implemented {@link goog.events.EventTarget}. A listener can
* only be added once to an object.
*
* @param {EventTarget|goog.events.EventTarget} src The node to listen to
* events on.
* @param {goog.events.EventWrapper} wrapper Event wrapper to use.
* @param {Function|Object} listener Callback method, or an object with a
* handleEvent function.
* @param {boolean=} opt_capt Whether to fire in capture phase (defaults to
* false).
* @param {Object=} opt_handler Element in whose scope to call the listener.
* @return {goog.events.EventHandler} This object, allowing for chaining of
* calls.
*/
goog.events.EventHandler.prototype. [[#variable3fb21820]]= function (src,wrapper,listener,opt_capt,opt_handler)
{ wrapper. [[#variable3fb217c0]](src,listener,opt_capt,opt_handler
|| this.handler_,this );
return this ;
} ;
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#3fb21820]] | unlistenWithWrapper |
| 1 | 2 | [[#3fb21820]] | listenWithWrapper |
| 2 | 1 | [[#3fb217c0]] | unlisten |
| 2 | 2 | [[#3fb217c0]] | listen |