繁体   English   中英

使用MutationObserver跟踪DOM更改事件时,如何获取事件的时间戳?

[英]When using MutationObserver to track DOM change events how can one get the timestamp of the event?

我正在使用MutationObserver来跟踪对DOM的更改,并且代码目前运行良好,但是我需要为事件添加时间戳。 MutationRecord似乎没有时间戳记属性

https://developer.mozilla.org/en/docs/Web/API/MutationObserver

我已经在MutationRecord的__proto__进行了连续钻取,但找不到太多内容。 请问如何获取活动创建的时间戳?

在使用该MutationRecord之前,请执行record.timestamp=performance.now();

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM