Use initialized input sources in getInputSources()

This commit is contained in:
Manish Goregaokar 2019-04-29 19:15:27 -07:00
parent 3a08e917e0
commit 5c8132c379
3 changed files with 19 additions and 1 deletions

View file

@ -19,6 +19,7 @@ use crate::dom::eventtarget::EventTarget;
use crate::dom::globalscope::GlobalScope;
use crate::dom::promise::Promise;
use crate::dom::vrdisplay::VRDisplay;
use crate::dom::xrinputsource::XRInputSource;
use crate::dom::xrlayer::XRLayer;
use crate::dom::xrreferencespace::XRReferenceSpace;
use crate::dom::xrrenderstate::XRRenderState;
@ -153,4 +154,9 @@ impl XRSessionMethods for XRSession {
p
}
/// https://immersive-web.github.io/webxr/#dom-xrsession-getinputsources
fn GetInputSources(&self) -> Vec<DomRoot<XRInputSource>> {
self.display.get_input_sources()
}
}