Amp html 帧通信

Amp html 帧通信,amp-html,Amp Html,在amp-iframe中有一个amp-script,我想通过postMessage、更改src URL等从script.js到iframe页面进行通信 <amp-script src="//path/to/script.js"> <div>TEXT HERE</div> <amp-iframe height="100" layout="fixed-height" sandbox="allow-scripts

amp-iframe
中有一个
amp-script
,我想通过
postMessage
、更改src URL等从
script.js
到iframe页面进行通信

<amp-script src="//path/to/script.js">
  <div>TEXT HERE</div>

  <amp-iframe
      height="100"
      layout="fixed-height"
      sandbox="allow-scripts allow-top-navigation"
      allowfullscreen
      frameborder="0"
      src="//path/to/iframe.html">
  </amp-iframe>
</amp-script>

此处文本
正确的方法是什么?由于
postMessage
对我不起作用,因此通过
amp-bind
更改URL不起作用,因为更新时错过了用户交互

想法是阅读此处的
文本
,并以某种方式将其传递给iframe


有什么想法吗?

有什么解决办法吗?