Why some object/property works in Preview Mode and not in Live mode?

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 ()
at s (clientWorker.362f5586.bundle.min.js:1)
at Function. (clientWorker.362f5586.bundle.min.js:1)
at MessagePort.n (clientWorker.362f5586.bundle.min.js:1)

Did you SYNCED your DBs?
Is your preview and live-database identical? Check it out.

It is not using collection. This Timestamp is a property of the event object in the onMouseIn event.

Please share your code. Tell us what you’re trying to do.

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.

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());

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.

Just FYI - the Preview mode will eventually be the same as the Live (Published) mode, but this is still under development and there is no ETA.

However, I will check with QA regarding this issue. Not sure why part of an object was removed. It might be based on implementation/use-case.

Thanks for your help and pls you don’t need check with QA. I will use your solution.

BTW - forgot to point out before… Velo is Velo. So we can’t guarantee that whatever’s under the hood (eg. React) will be usable by Velo users. What you were doing was basically a hack - and I’m also guilty. However, the API is the source of what can be used, what’s been deprecated, and what is no longer valid. If you want to be sure, go by the API.

Oh, and I asked QA anyhow. I’m curious.

Yes I agree. I used a resource that shouldn’t. Tnx again.