diff --git a/src/serialize/function.js b/src/serialize/function.js index 3dabd4cf..1927d4e4 100644 --- a/src/serialize/function.js +++ b/src/serialize/function.js @@ -68,6 +68,12 @@ export function deserializeFunction(source : CrossDomainWindowType, origin : .then(({ data }) => data.result); } + crossDomainFunctionWrapper.fireAndForget = function crossDomainFireAndForgetFunctionWrapper() : ZalgoPromise { + 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;