--- title: vrdisplaydisconnected slug: Web/API/Window/vrdisplaydisconnect_event translation_of: Web/API/Window/vrdisplaydisconnect_event ---
{{APIRef}}{{SeeCompatTable}}

WebVR API の vrdisplaydisconnected イベントは,互換性のあるVRデバイスがコンピュータから接続解除された時に発火します.

Bubbles No
Cancelable No
Target objects {{domxref("Window")}}
Interface {{domxref("Event")}}

You can use the vrdisplaydisconnect event in an addEventListener method:

window.addEventListener('vrdisplaydisconnect', function() {
  info.textContent = 'Display disconnected.';
  reportDisplays();
});

Or use the onvrdisplaydisconnect event handler property:

window.onvrdisplaydisconnect = function() {
  info.textContent = 'Display disconnected.';
  reportDisplays();
);

仕様

Specification Status Comment
{{SpecName('WebVR 1.1', '#dom-window-onvrdisplaydisconnected', 'vrdisplaydisconnected')}} {{Spec2('WebVR 1.1')}} Initial definition

ブラウザの互換性

{{Compat("api.Window.vrdisplaydisconnect_event")}}

参照