MCPcopy Create free account
hub / github.com/Xu22Web/tech-study-js / waitFrameClose

Function waitFrameClose

tech-study.js:3627–3637  ·  view source on GitHub ↗

* @description 等待窗口任务结束 * @param id * @returns

()

Source from the content-addressed store, hash-verified

3625 * @returns
3626 */
3627function waitFrameClose() {
3628 return new Promise((resolve) => {
3629 const timer = setInterval(() => {
3630 // 窗口关闭
3631 if (frame.closed) {
3632 clearInterval(timer);
3633 resolve(true);
3634 }
3635 }, 100);
3636 });
3637}
3638// 等待窗口加载
3639function waitFrameLoaded(iframe) {
3640 return new Promise((resolve) => {

Callers 1

waitTaskWinFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected