LCP:最大内容绘制
var observer = new PerformanceObserver((entryList) => {
var perfEntries = entryList.getEntries();
var lastEntry = perfEntries[perfEntries.length - 1];
var lcp = lastEntry.renderTime || lastEntry.loadTime;
console.log('LCP:', lcp)
});
observer.observe({entryTypes: ['largest-contentful-paint']});