   constructor: (params) ->
     self = @
     @_onProgress = ->
+    @_onProgressExternal = ->
     @_onDone = ->
   
     @_handler =
       progress: (data) ->
         self._onProgress data
+        self._nextChunk()
       done: (data) ->
         self._onDone data.sha256
 

        @worker = new WorkerFallback

    update: (params) ->
      if params.onProgress?
        @worker.setOnProgress(params.onProgress)
      @_chunks = true
      @worker.sendChunk
        chunk: params.data
        chunkNumber: @_chunkNumber++

    

class WebWorker extends BaseWorker
  _busy: false
  _buffer: []

  constructor: (params) ->
    super params
    @worker = new Worker Crypto.workerSrc
