The attribution
readonly property of the PerformanceLongTaskTiming
interface returns an array of TaskAttributionTiming
objects.
Value
Examples
Logging attributions for long tasks
const observer = new PerformanceObserver((list) => {
list.getEntries().forEach((entry) => {
entry.attribution.forEach((attributionEntry) => {
console.log(attributionEntry);
});
});
});
observer.observe({ type: "longtask", buffered: true });
Specifications
Browser compatibility
|
Desktop |
Mobile |
|
Chrome |
Edge |
Firefox |
Internet Explorer |
Opera |
Safari |
WebView Android |
Chrome Android |
Firefox for Android |
Opera Android |
Safari on IOS |
Samsung Internet |
attribution |
58 |
79 |
No |
No |
45 |
No |
58 |
58 |
No |
43 |
No |
7.0 |
See also