Skip to content

Commit

Permalink
Add fireAndForget to function deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
bluepnume committed Nov 25, 2018
1 parent ab5dfa9 commit 6f7b404
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/serialize/function.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ export function deserializeFunction<T>(source : CrossDomainWindowType, origin :
.then(({ data }) => data.result);
}

crossDomainFunctionWrapper.fireAndForget = function crossDomainFireAndForgetFunctionWrapper<X : mixed>() : ZalgoPromise<X> {
let args = Array.prototype.slice.call(arguments);
return global.send(source, MESSAGE_NAME.METHOD, { id, name, args }, { domain: origin, fireAndForget: true })
.then(({ data }) => data.result);
};

crossDomainFunctionWrapper.__name__ = name;
crossDomainFunctionWrapper.__xdomain__ = true;

Expand Down

0 comments on commit 6f7b404

Please # to comment.