             @emit("ModuleDownloadProgress", event, module)
             @_reportTotalProgress()
         module_request.onerror = (event) =>
-            @emit("ModuleDownloadFailed", event, module)
+            @emit("ModuleDownloadFailed", event, module, null)
         module_request.onabort = (event) =>
-            @emit("ModuleDownloadFailed", event, module)
+            @emit("ModuleDownloadFailed", event, module, null)
         module_request.send()
         return
 

        return localforage.removeItem(key, cb)

    onNoManifest: (error) ->
    onUpToDate: (event) ->
    onUpdateFound: (event, manifest) -> @startUpdate()
    onUpdateFailed: (event, error)-> 
    onUpdateCompleted: (manifest) -> return true

                return @_downloadModule(module, onDownload) unless module_source?
               
                if @hash_func(module_source) != module.hash
                    @emit("ModuleDownloadFailed", null, module, new HashMismatchedError(module.url, module.hash, hash))
                    return
                module.source = module_source
                module.loaded = module.size
