summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/modules/xr/xr.idl
blob: 93aba883d87f0a3e8e91740dede7d7eba3953734 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://immersive-web.github.io/webxr/#xr-interface
[
    SecureContext,
    Exposed=Window,
    RuntimeEnabled=WebXR
] interface XR : EventTarget {
  attribute EventHandler ondevicechange;
  [CallWith=ScriptState, DeprecateAs=XRSupportsSession, RaisesException] Promise<void> supportsSession(XRSessionMode mode);
  [CallWith=ScriptState, MeasureAs=XRIsSessionSupported, RaisesException] Promise<boolean> isSessionSupported(XRSessionMode mode);
  [CallWith=ScriptState, MeasureAs=XRRequestSession, RaisesException] Promise<XRSession> requestSession(XRSessionMode mode, optional XRSessionInit options);
};