W3cubDocs

/Web APIs

PerformanceLongTaskTiming: attribution property

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The attribution readonly property of the PerformanceLongTaskTiming interface returns an array of TaskAttributionTiming objects.

Value

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

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

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/PerformanceLongTaskTiming/attribution