Determining whether VR Active from a Toolbar Panel

Is there a property you can query from a toolbar panel/app that tells you
whether the simulator is running in VR? thanks /DB

window.globalVars.vrMode

great, many thanks