【问题标题】:How to wait for an iframe to be fully loaded [duplicate]如何等待 iframe 完全加载 [重复]
【发布时间】:2019-12-19 06:19:57
【问题描述】:

我想测量 iframe 加载时间

我尝试使用 async-await 但这不起作用

mesureLoadTime = async function()
{
this.StartTime = new Date().getTime();
this.content = await this.sanitizer.bypassSecurityTrustResourceUrl('https://www.example.com')
this.EndTime = new Date().getTime();
this.loadTime = (this.EndTime - this.StartTime)/ 1000
}

【问题讨论】:

  • <iframe ... (load)="someFunction()"></iframe>

标签: javascript angular asynchronous ionic-framework iframe


【解决方案1】:

检查console.time是否是您要查找的内容

【讨论】:

    猜你喜欢
    • 2013-08-31
    • 1970-01-01
    • 1970-01-01
    • 2011-12-23
    • 2021-02-05
    • 1970-01-01
    • 2013-10-31
    • 2019-02-10
    • 1970-01-01
    相关资源
    最近更新 更多