# iframe-postMessage **Repository Path**: codeResp/iframe-postMessage ## Basic Information - **Project Name**: iframe-postMessage - **Description**: iframe-postMessage 跨域笔记。 注意,本质上利用postMessage通信,仍然是自己给自己通信。 要给x.html通信,就必须先拿到x.html自己环境下的contentWindow. 然后在使用contentWindow.postMessage('data','自己的域名') 进行数据传递。 监听数据,在自己内部通过 window.addEventListener('message',function (e) { e.data 获取数据 }) - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2019-04-13 - **Last Updated**: 2024-05-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README No README documentation available for this project.