lighthouse 9.1.0-dev.20211209 → 9.1.0-dev.20211210
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -150,7 +150,9 @@ class LanternFirstContentfulPaint extends LanternMetric {
|
|
|
150
150
|
return dependencyGraph.cloneWithRelationships(node => {
|
|
151
151
|
if (node.type === BaseNode.TYPES.NETWORK) {
|
|
152
152
|
// Exclude all nodes that ended after paintTs (except for the main document which we always consider necessary)
|
|
153
|
-
|
|
153
|
+
// endTime is negative if request does not finish, make sure startTime isn't after paintTs in this case.
|
|
154
|
+
const endedAfterPaint = node.endTime > paintTs || node.startTime > paintTs;
|
|
155
|
+
if (endedAfterPaint && !node.isMainDocument()) return false;
|
|
154
156
|
|
|
155
157
|
const url = node.record.url;
|
|
156
158
|
// If the URL definitely wasn't render-blocking then we filter it out.
|
|
@@ -211,6 +211,7 @@ class ExecutionContext {
|
|
|
211
211
|
window.__nativePromise = window.Promise;
|
|
212
212
|
window.__nativeURL = window.URL;
|
|
213
213
|
window.__nativePerformance = window.performance;
|
|
214
|
+
window.__nativeFetch = window.fetch;
|
|
214
215
|
window.__ElementMatches = window.Element.prototype.matches;
|
|
215
216
|
// Ensure the native `performance.now` is not overwritable.
|
|
216
217
|
const performance = window.performance;
|
|
@@ -232,6 +233,7 @@ class ExecutionContext {
|
|
|
232
233
|
'const Promise = globalThis.__nativePromise || globalThis.Promise',
|
|
233
234
|
'const URL = globalThis.__nativeURL || globalThis.URL',
|
|
234
235
|
'const performance = globalThis.__nativePerformance || globalThis.performance',
|
|
236
|
+
'const fetch = globalThis.__nativeFetch || globalThis.fetch',
|
|
235
237
|
].join(';\n');
|
|
236
238
|
|
|
237
239
|
/**
|
package/package.json
CHANGED
package/types/externs.d.ts
CHANGED