1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-26 19:02:20 -05:00

integrate imap-client master with webworker stuff merged

This commit is contained in:
Tankred Hase 2013-09-20 18:42:47 +02:00
parent 6f6168b2b5
commit a3849af57f
2 changed files with 10 additions and 1 deletions

View File

@ -11,7 +11,7 @@
}, },
"dependencies": { "dependencies": {
"crypto-lib": "https://github.com/whiteout-io/crypto-lib/tarball/master", "crypto-lib": "https://github.com/whiteout-io/crypto-lib/tarball/master",
"imap-client": "git+ssh://git@github.com:whiteout-io/imap-client.git#amd", "imap-client": "git+ssh://git@github.com:whiteout-io/imap-client.git#master",
"smtp-client": "git+ssh://git@github.com:whiteout-io/smtp-client.git#master", "smtp-client": "git+ssh://git@github.com:whiteout-io/smtp-client.git#master",
"requirejs": "2.1.8" "requirejs": "2.1.8"
}, },

View File

@ -323,6 +323,15 @@ define(function(require) {
// return result from the worker // return result from the worker
options.callback(null, e.data); options.callback(null, e.data);
}; };
worker.onerror = function(e) {
// show error message in console
console.error('Error handling web worker: Line ' + e.lineno + ' in ' + e.filename + ': ' + e.message);
// return error
options.callback({
errMsg: (e.message) ? e.message : e
});
return;
};
// send data to the worker // send data to the worker
worker.postMessage(options.args); worker.postMessage(options.args);
return; return;