Attempting to utilize a Javascript postMessage
function, similar to how it can be done with an iframe, but now with an embed element. The reason for using an embed is due to the bug in IOS devices which causes issues with setting iframe width and height.
While I'm able to perform a postMessage from inside the embed to the parent, I am encountering difficulties posting to the embed itself. Some methods I've tried include:
document.getElementById("embed").contentWindow.postMessage(...)
document.getElementById("embed").contentDocument.postMessage(...)
document.getElementById("embed").document.postMessage(...)
document.getElementById("embed").getSVGDocument() // returns null
Current embed configuration:
<embed src="URL" id="embed" type="text/html"></embed>
Seeking any possible solutions or alternatives for this issue.