injust commented on a change in pull request #1802: Prefer Paint Timing API over chrome.loadTimes() URL: https://github.com/apache/incubator-pagespeed-mod/pull/1802#discussion_r240366667
########## File path: net/instaweb/rewriter/add_instrumentation.js ########## @@ -88,21 +88,30 @@ pagespeed.AddInstrumentation.prototype.sendBeacon = function() { timingApi['responseEnd'] - timingApi['responseStart']); url += '&dom_c=' + (timingApi['domContentLoadedEventStart'] - navStartTime); - if (window['performance']['navigation']) { - url += '&nt=' + window['performance']['navigation']['type']; + if (winPerf['navigation']) { + url += '&nt=' + winPerf['navigation']['type']; } var firstPaintTime = -1; + var paintEntries, loadTimes; if (timingApi['msFirstPaint']) { // IE. firstPaintTime = timingApi['msFirstPaint']; - } else if (window['chrome'] && window['chrome']['loadTimes']) { + } else if (winPerf['timeOrigin'] && Review comment: It doesn't work for `getEntriesByType` because calling that depends on its context. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services