2
0
mirror of https://github.com/esiur/esiur-js.git synced 2025-05-06 12:32:58 +00:00

TriggerChunk

This commit is contained in:
Ahmed Zamil 2020-01-16 03:52:55 +03:00
parent 4606993bf1
commit f7f57a5f43
2 changed files with 4 additions and 7 deletions

View File

@ -1,6 +1,6 @@
{
"name": "esyur",
"version": "1.3.8",
"version": "1.3.9",
"description": "Distributed Object Framework",
"main": "esyur.js",
"scripts": {

View File

@ -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);
}