I use the Timestamp on mouseIn/Out event. On preview mode works fine.
On live I got the message on Dev Tools
Uncaught (in promise) TypeError: Cannot read property 'timeStamp' of undefined
at l3v00.js:1
at componentSdks.98017970.bundle.min.js:1
at clientWorker.362f5586.bundle.min.js:1
at clientWorker.362f5586.bundle.min.js:1
at Object.next (clientWorker.362f5586.bundle.min.js:1)
at clientWorker.362f5586.bundle.min.js:1
at new Promise (<anonymous>)
at s (clientWorker.362f5586.bundle.min.js:1)
at Function.<anonymous> (clientWorker.362f5586.bundle.min.js:1)
at MessagePort.n (clientWorker.362f5586.bundle.min.js:1)
Yes I agree. I used a resource that shouldn't. Tnx again.
Thanks for your help and pls you don't need check with QA. I will use your solution.
I got. It is not right. We can not devel using a different envs between Preview and Live. My project has (had) the resource using the syntheticEvent properties pressed key and timestamp. The syntheticEvent is part of React (SPA) app and wix removed (hidden) it . During one year my code works fine. No, it is not correct. I spent 3 day debugging my code and I found a wix fault.
How to trust in the Velo? My question is why to hide one available resource? If wix wants to remove some resource, wix need to warning first and give us (devs) time and replace option. Platforms have the lifecycle for their resource but have the depreciate date and replace options.
If you check other events, you'll see that they all have the syntheticEvent in the event object - but only in the Editor. The Editor Preview is a different run environment than the Live (Published) environment, and often has different run-time characteristics.
You can create your own timestamp by doing one of the following:
console.log('timestamp', Date.now());
console.log('timestamp', performance.now());
My code: export function image1_mouseOut(event) { // The event parameter has the property synteticEvent.timeStamp // on preview mode but it has no one in live mode console.log('Image mouse out - event', event) console.log('Image mouse out - event', event.syntheticEvent.timeStamp) }
Preview Mode
Live mode:
I tried using the target context but the event.target is the element itself.
Please share your code. Tell us what you're trying to do.
It is not using collection. This Timestamp is a property of the event object in the onMouseIn event.
Did you SYNCED your DBs?
Is your preview and live-database identical? Check it out.