browsertime 16.3.0 → 16.4.0
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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Browsertime changelog (we do [semantic versioning](https://semver.org))
|
|
2
2
|
|
|
3
|
+
## 16.4.0 - 2022-05-11
|
|
4
|
+
### Added
|
|
5
|
+
* If we have the Largest Contentful Paint for the video, add that to the video text instead of DOMContentLoaded [#1783](https://github.com/sitespeedio/browsertime/pull/1783).
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
* Only get LCP in Visual Metrics if the LCP API gives us a element [#1786](https://github.com/sitespeedio/browsertime/pull/1786).
|
|
3
9
|
## 16.3.0 - 2022-05-07
|
|
4
10
|
### Added
|
|
5
11
|
* If you use `--visualElements` and the browser supports the Largest Contentful API, we also record
|
|
@@ -133,7 +133,8 @@
|
|
|
133
133
|
const entries = observer.takeRecords();
|
|
134
134
|
if (entries.length > 0) {
|
|
135
135
|
const largestEntry = entries[entries.length - 1];
|
|
136
|
-
|
|
136
|
+
// It seems that the API do not alwayas have a elememt
|
|
137
|
+
if (largestEntry.element && isElementPartlyInViewportAndVisible(largestEntry.element)) {
|
|
137
138
|
keepLargestElementByType('LargestContentfulPaint', largestEntry.element);
|
|
138
139
|
}
|
|
139
140
|
}
|
|
@@ -52,7 +52,13 @@ module.exports = function (videoMetrics, timingMetrics, options) {
|
|
|
52
52
|
value: vm.LastVisualChange
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
|
|
55
|
+
|
|
56
|
+
if (vm.LargestContentfulPaint) {
|
|
57
|
+
metricsAndValues.push({
|
|
58
|
+
name: 'LargestContentfulPaint',
|
|
59
|
+
value: vm.LargestContentfulPaint
|
|
60
|
+
});
|
|
61
|
+
} else if (timingMetrics) {
|
|
56
62
|
const pt = timingMetrics;
|
|
57
63
|
metricsAndValues.push({
|
|
58
64
|
name: 'DOMContentLoaded',
|