I have a hidden frame that Accepted message, but I do not have to send by clicking. I'm calling the function that performs and actions, including sending a message. Function settimeout not satisfied by their speed.
this.request = function (requestData) {
$(function () {
dataOrign = requestData;
var iframe = $('iframe#postFrame');
setTimeout(function () {
var parseData = JSON.stringify(requestData);
iframe[0].contentWindow.postMessage({ request: parseData }, '*');
}, 1000);
});
};
How can i send postMessage with minimal time? In this situation?