mirror of
https://github.com/esiur/esiur-js.git
synced 2025-05-06 04:22:58 +00:00
TriggerChunk
This commit is contained in:
parent
4606993bf1
commit
f7f57a5f43
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "esyur",
|
||||
"version": "1.3.8",
|
||||
"version": "1.3.9",
|
||||
"description": "Distributed Object Framework",
|
||||
"main": "esyur.js",
|
||||
"scripts": {
|
||||
|
@ -87,6 +87,9 @@ export default class AsyncReply extends Promise
|
||||
|
||||
trigger(result)
|
||||
{
|
||||
if (this.ready)
|
||||
return;
|
||||
|
||||
this.result = result;
|
||||
this.ready = true;
|
||||
|
||||
@ -114,18 +117,12 @@ export default class AsyncReply extends Promise
|
||||
|
||||
triggerProgress(type, value, max)
|
||||
{
|
||||
if (this.ready)
|
||||
return;
|
||||
|
||||
for(var i = 0; i < this.progressCallbacks.length; i++)
|
||||
this.progressCallbacks[i](type, value, max, this);
|
||||
}
|
||||
|
||||
triggerChunk(value)
|
||||
{
|
||||
if (this.ready)
|
||||
return;
|
||||
|
||||
for(var i = 0; i < this.chunkCallbacks.length; i++)
|
||||
this.chunkCallbacks[i](value, this);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user