PerformanceEventTiming: thuộc tính processingEnd
Baseline
2025
Newly available
Since December 2025, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
Thuộc tính chỉ đọc processingEnd trả về thời điểm trình xử lý sự kiện cuối cùng kết thúc thực thi.
Nó bằng với PerformanceEventTiming.processingStart khi không có trình xử lý sự kiện nào như vậy.
Giá trị
Dấu thời gian DOMHighResTimeStamp.
Ví dụ
>Sử dụng thuộc tính processingEnd
Thuộc tính processingEnd có thể được sử dụng khi quan sát các mục event-timing (PerformanceEventTiming). Ví dụ, để tính toán độ trễ đầu vào hoặc thời gian xử lý sự kiện.
js
const observer = new PerformanceObserver((list) => {
list.getEntries().forEach((entry) => {
// Full duration
const duration = entry.duration;
// Input delay (before processing event)
const delay = entry.processingStart - entry.startTime;
// Synchronous event processing time
// (between start and end dispatch)
const time = entry.processingEnd - entry.processingStart;
});
});
// Register the observer for events
observer.observe({ type: "event", buffered: true });
Thông số kỹ thuật
| Thông số kỹ thuật |
|---|
| Event Timing API> # dom-performanceeventtiming-processingend> |