postMessage into object tag

杀马特。学长 韩版系。学妹 提交于 2019-12-23 04:38:06

问题


I am trying to get the html inside an object respond to my postMessage, but I am unable to get the referencing correct.

I've tried

var object = $("#test_object").get(0).contentWindow;
object.postMessage("run","*");

which works for iframe.

But as i am determined to use the object tag. Is there a way to pass the postMessage through?


回答1:


No, postMessage works only for iframes and windows/tabs.



来源:https://stackoverflow.com/questions/13830884/postmessage-into-object-tag

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!