mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-26 08:25:52 +00:00
CompletionHandlerAgent fire() is a one shot.
This commit is contained in:
1 parent
dc87354702
commit
b78e9062a1
1 file changed
+8
-1
@@ -501,7 +501,12 @@ CompletionHandlerAgent.prototype.completionHandler = function()
|
||||
|
||||
CompletionHandlerAgent.prototype.fire = function()
|
||||
{
|
||||
this._completionHandler();
|
||||
if (this.valid)
|
||||
{
|
||||
this._completionHandler();
|
||||
this.valid = false;
|
||||
this.total = 0;
|
||||
}
|
||||
};
|
||||
|
||||
CompletionHandlerAgent.prototype.increment = function(inc)
|
||||
@@ -525,6 +530,8 @@ CompletionHandlerAgent.prototype.decrement = function()
|
||||
CompletionHandlerAgent.prototype.invalidate = function()
|
||||
{
|
||||
this.valid = false;
|
||||
this.total = 0;
|
||||
this._completionHandler = null;
|
||||
};
|
||||
|
||||
var _animationFlushingObserverCallback = function()
|
||||
|
||||
Reference in new issue
Block a user