MZ Check if game is fullscreen?

Hey all,

Looking for a way to check if the game is currently in full screen or windowed mode (to be saved in a switch where ON is full screen and OFF is windowed). Been digging for a while, but I can't seem to find anything to do this? It seems like a pretty simple thing, though, so I might just be missing something.
I think this script call should work:
Graphics._isFullScreen()

If the game is fullscreen, it will return true.

$gameSwitches.setValue(switchId, Graphics._isFullScreen())
I think this script call should work:
Graphics._isFullScreen()

If the game is fullscreen, it will return true.

$gameSwitches.setValue(switchId, Graphics._isFullScreen())

This works perfectly. Thanks!

On a related note, I'm using the following reference sheet for JS:

I notice that this specific script call isn't listed anywhere in this reference. Is there another place I can find a list of available script calls?
I think this script call should work:
Graphics._isFullScreen()

If the game is fullscreen, it will return true.

$gameSwitches.setValue(switchId, Graphics._isFullScreen())

Hmmm I checked that in console just for fun and it seems to return some kind of object or element or whatever instead of true. I guess the switch checks will still work, but don't know if that can cause some kind of problems that instead of true in the gameSwitches there'll be some kind of long list of stuff.

But yeah, if it matters, you can just write it like:
if (Graphics._isFullScreen()) {
$gameSwitches.setValue(switchId, true);
} else {
$gameSwitches.setValue(switchId, false);
}
But yeah, if it matters, you can just write it like:
if it returns something falsy when the game isnt fullscreen, you should be able to use !!Graphics._isFullScreen() and save the need for the condition
Code:
$gameSwitches.setValue(switchId, !!Graphics._isFullScreen());

Original thread: https://forums.rpgmakerweb.com/threads/check-if-game-is-fullscreen.183836/