1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-24 23:26:50 +02:00

Android: Fixed resource loading issue, and improved logging on desktop

This commit is contained in:
Laurent Cozic
2019-05-24 17:34:18 +01:00
parent 43624ffa75
commit aaaf27af6e
5 changed files with 297 additions and 263 deletions

View File

@ -63,6 +63,24 @@ webviewLib.getParentAnchorElement = function(element) {
}
}
webviewLib.cloneError = function(error) {
return {
message: error.message,
stack: error.stack
};
}
webviewLib.logEnabledEventHandler = function(fn) {
return function(event) {
try {
return fn(event);
} catch (error) {
webviewLib.options_.postMessage('error:' + JSON.stringify(webviewLib.cloneError(error)));
throw error;
}
}
}
webviewLib.initialize = function(options) {
webviewLib.options_ = options;
}