postMessage Source IFrame

前端 未结 6 1892
执念已碎
执念已碎 2020-12-13 15:21

I\'m working on a website with cross-domain iframes that are resized to the correct height using postMessage. The only problem I\'m having is identifying which iframe has wh

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-13 15:44

    The event should also have a property "source" that can be compared to the iframes "contentWindow" property.

提交回复
热议问题