I need to build pages for VR systems. This works in a very weird way: A browser running inside the VR environment injects a object named zData.
So, if I type window on the console, this will list all the things related to window such as navigator, focus, screen - And an additional object: zData
I need to observe the window.zData and track the changes.
So, since I can't reproduce this here, let's pretend that zData does not exists. Let's say that I need to track the innerWidth value of window. So every time I reduce my window or reduce my view port, this must trigger.
I need something like :
window.innerWidth.subscribe((oldValue,newValue) => {
console.log('old', oldValue);
console.log('new', newValue);
});
If I got a solution to track the innerWidth, I believe I can use the same to track my zData. How to archive it ?
Thanks !