[html] 怎样计算首屏和白屏的时间?
生活随笔
收集整理的這篇文章主要介紹了
[html] 怎样计算首屏和白屏的时间?
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
[html] 怎樣計(jì)算首屏和白屏的時(shí)間?
function showPaintTimings() {if (window.performance) {let performance = window.performance;let performanceEntries = performance.getEntriesByType('paint');performanceEntries.forEach( (performanceEntry, i, entries) => {console.log("The time to " + performanceEntry.name + " was " + performanceEntry.startTime + " milliseconds.");});} else {console.log('Performance timing isn\'t supported.');} }個(gè)人簡(jiǎn)介
我是歌謠,歡迎和大家一起交流前后端知識(shí)。放棄很容易,
但堅(jiān)持一定很酷。歡迎大家一起討論
主目錄
與歌謠一起通關(guān)前端面試題
總結(jié)
以上是生活随笔為你收集整理的[html] 怎样计算首屏和白屏的时间?的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: java udp 连接_Java UDP
- 下一篇: 需求文档、需求分析报告、需求规格说明书分