Iframe is cached. When opening document non-first time, cannot call api, console reports timeout error
Answer:
Vue/React etc. cache iframe. First time opening document and closing document, calling api is fine. After closing document, next time opening document, due to caching, document does not need to be remounted, but at this time the iframe's window is not the same window as the first time opening iframe's window. Since SDK's core is window.postMessage, api cannot be called. When opening document non-first time (every time), call ZOfficeSDK.connect to re-establish connection before calling api.