Detecting when Iframe content has loaded (Cross browser)

前端 未结 4 1934
自闭症患者
自闭症患者 2020-11-29 00:51

I\'m trying to detect when an iframe and its content have loaded but not having much luck. My application takes some input in text fields in the parent window and updates th

4条回答
  •  抹茶落季
    2020-11-29 01:18

    For those using React, detecting a same-origin iframe load event is as simple as setting onLoad event listener on iframe element.