-
-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#722@minor: Add timeStamp property to Event. #723
#722@minor: Add timeStamp property to Event. #723
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice contribution ⭐ Found some minor things.
Co-authored-by: David Ortner <david@ortner.se>
Co-authored-by: David Ortner <david@ortner.se>
I had to do a little bit of "massaging" for the timeStamp test to work. Used this solution from StackOverflow. There's still some other tests failing in my fork after merging the upstream changes (bringing in Turborepo etc), but I'll try to figure them out. |
I'm a bit stuck as now there's a circular dependency apparently due to use of
I'll need to investigate this more a bit later. |
@aripalo usually this happens when I have tried to solve this in multiple places by changing from I will try to make a better solution in the future. Maybe use Vitest instead and perhaps create a custom |
@aripalo I managed to find the problem with the failing unit test now. I have fixed it and pushed in two commits. I accidentally used the wrong user. It became a generated user, but I guess it is fine 😅 |
@capricorn86 sweet! I was a bit stuck with this as I'm not really familiar with internals of Happy DOM and haven't had the time to dive into it lately. Thanks for merging! 🙌 (and thanks for this library, really great stuff!) |
Fix #722 by implementing
timeStamp
property onEvent
.According to specification (see MDN and Spec) the
timeStamp
property is described as follows:My proposed solution is to use
performance.timeOrigin
as the time origin to resolve the relative EventtimeStamp
value.