【发布时间】: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