+
+ _runAsync (fn, value) {
+ fn(value.data)
+ .then(res => {
+ this.parent.postMessage({ data: res, _id: value._id })
+ this.lastTask = Date.now()
+ })
+ .catch(e => {
+ this.parent.postMessage({ error: e, _id: value._id })
+ this.lastTask = Date.now()
+ })
+ }