mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-01-20 01:31:45 +03:00
Use variable instead of function name.
This commit is contained in:
parent
d3b027bade
commit
fddf0fb938
@ -67,10 +67,11 @@ $.EventSource.prototype = {
|
|||||||
*/
|
*/
|
||||||
addOnceHandler: function(eventName, handler, userData) {
|
addOnceHandler: function(eventName, handler, userData) {
|
||||||
var self = this;
|
var self = this;
|
||||||
this.addHandler(eventName, function onceHandler(event) {
|
var onceHandler = function(event) {
|
||||||
self.removeHandler(eventName, onceHandler);
|
self.removeHandler(eventName, onceHandler);
|
||||||
handler(event);
|
handler(event);
|
||||||
}, userData);
|
};
|
||||||
|
this.addHandler(eventName, onceHandler, userData);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user