Seeking documentation on NSScreen

I have an applet which I need to be useable in all versions of macOS from 10.10 onwards. In the applet I have this code for getting the screen’s dimensions:

set mainScreenFrame to current application's NSScreen's mainScreen()'s frame() as list
set screen_width to item 1 of item 2 of mainScreenFrame as integer
set screen_height to item 2 of item 2 of mainScreenFrame as integer

In macOS 10.13 and above, the mainScreenFrame variable has contents that look like this:

But, in OS X 10.11, mainScreenFrame contains this:

Which naturally causes an error in the next line of code which tries to get screen_width.

It seems that different data is returned by NSScreen’s mainScreen()'s frame() in different versions of macOS. I can’t find any documentation on this. I’ve Googled and searched Apple’s documentation but can’t find anything on this.

Does anyone know where to find such documentation ?

Thanks.

Model: iMac (Retina 5K, 27-inch, Late 2015)
Browser: Safari 15.3 (17612.4.9.1.8)
Operating System: macOS 12

It changed in High Sierra. You can read about workarounds here:

https://latenightsw.com/high-sierra-applescriptobjc-bugs/

Many thanks. No wonder I couldn’t find mention in Apple’s documentation. Before looking at the suggestion, my code was designed for 10.13+. So, I decided to work around by adding code specifically for 10.11 and 10.12. It works but not as compact.

Cheers.