window.postMessage(JSON.stringify({
type: 'loggedIn',
userToken: token,
}));
My problem is from the above code.
It gives me TypeError: Not enough arguments on ios devices.
Please help me if you experienced this issue.
Thanks
window.postMessage(JSON.stringify({
type: 'loggedIn',
userToken: token,
}));
My problem is from the above code.
It gives me TypeError: Not enough arguments on ios devices.
Please help me if you experienced this issue.
Thanks
You're not supplying both required arguments. From the MDN documentation:
targetWindow.postMessage(message, targetOrigin, [transfer]);
Note that targetOrigin is not optional. Specify the target origin of the message, e.g.:
window.postMessage(JSON.stringify({
type: 'loggedIn',
userToken: token,
}), window.origin);