this.media and this.pageWindowRect undefined intermittently
this.pageWindowRect variable. I've found from various forum posts that this has to be 'enabled' by accessing
This works most of the time, but intermittently on certain computers, I find that both
this.pageWindowRect are undefined.
It is difficult to reproduce this exactly: sometimes it seems to work fine, and sometimes they seem to stay undefined. I've tried delaying my code - in case things are taking a while to load - and running the code from a document-level script, a button, and the console. It all seems to work intermittently.
The attached file has a timer running in the document-level JS, which prints out the value of these variables every few seconds for a couple of minutes (in case the initialisation is delayed). On most computers this seems to work fine, but on some computers both variables return 'undefined' for the entire period the code is running.
Any support or advice would be much appreciated.