-
Notifications
You must be signed in to change notification settings - Fork 22.5k
/
index.md
45 lines (31 loc) · 1014 Bytes
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
title: "PerformanceLongTaskTiming: attribution property"
short-title: attribution
slug: Web/API/PerformanceLongTaskTiming/attribution
page-type: web-api-instance-property
status:
- experimental
browser-compat: api.PerformanceLongTaskTiming.attribution
---
{{SeeCompatTable}}{{APIRef("Performance API")}}
The **`attribution`** readonly property of the {{domxref("PerformanceLongTaskTiming")}} interface returns an array of {{domxref('TaskAttributionTiming')}} objects.
## Value
An {{jsxref("Array")}} of {{domxref('TaskAttributionTiming')}} objects.
## Examples
### Logging attributions for long tasks
```js
const observer = new PerformanceObserver((list) => {
list.getEntries().forEach((entry) => {
entry.attribution.forEach((attributionEntry) => {
console.log(attributionEntry);
});
});
});
observer.observe({ type: "longtask", buffered: true });
```
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- {{domxref('TaskAttributionTiming')}}