The VRDisplayCapabilities interface of the WebVR API describes the capabilities of a VRDisplay — its features can be used to perform VR device capability tests, for example can it return position information.
The canPresent read-only property of the VRDisplayCapabilities interface returns a Boolean stating whether the VR display is capable of presenting content (e.g. through an HMD).
The hasExternalDisplay read-only property of the VRDisplayCapabilities interface returns a Boolean stating whether the VR display is separate from the device's primary display.
The hasOrientation read-only property of the VRDisplayCapabilities interface returns a Boolean stating whether the VR display can track and return orientation information.
The hasPosition read-only property of the VRDisplayCapabilities interface returns a Boolean stating whether the VR display can track and return position information.
The maxLayers read-only property of the VRDisplayCapabilities interface returns a number indicating the maximum number of VRLayers that the VR display can present at once (e.g. the maximum length of the array that Display.requestPresent() can accept.)