I have a Parent window from where I am opening a Popup using window.open()
. Following is the code snippet:
window.callParentFunction = (data, filesArr) => { this.onReceiveMessage({ data }, filesArr);
}
this.postEditorWindow = window.open('some url here');
// postEditorWindow I am using later to close popup window.
I want to send the array of files from popup window to Parent window, so I am calling:
window.opener.callParentFunction()
...From child / popup window, which is sending the data properly, but in IE Edge and IE 10/11, its behaviour is weird. The File Information gets lost. While in Chrome and Firefox its working perfectly fine.
i.e. Inside IE type of filesArr
elements is [object File]
while selecting the file, but when I send it via helper function to parent window, it becomes plain [object]
, inside parent window hence file is not getting saved.
Do someone have any idea about this ? Thanks.