PerformanceLongTaskTiming: thuộc tính attribution
Khả dụng hạn chế
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Thuộc tính chỉ đọc attribution của giao diện PerformanceLongTaskTiming trả về một mảng các đối tượng TaskAttributionTiming.
Giá trị
Một Array các đối tượng TaskAttributionTiming.
Ví dụ
>Ghi nhật ký các attribution cho tác vụ dài
js
const observer = new PerformanceObserver((list) => {
list.getEntries().forEach((entry) => {
entry.attribution.forEach((attributionEntry) => {
console.log(attributionEntry);
});
});
});
observer.observe({ type: "longtask", buffered: true });
Thông số kỹ thuật
| Thông số kỹ thuật |
|---|
| Long Tasks API> # dom-performancelongtasktiming-attribution> |