mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Handle AddInput/RemoveInput events
This commit is contained in:
parent
a90a42012b
commit
f721113f8d
5 changed files with 71 additions and 5 deletions
|
@ -289,7 +289,12 @@ impl XRSession {
|
|||
);
|
||||
event.upcast::<Event>().fire(self.upcast());
|
||||
},
|
||||
_ => (), // XXXManishearth TBD
|
||||
XREvent::AddInput(info) => {
|
||||
self.input_sources.add_input_source(self, info);
|
||||
},
|
||||
XREvent::RemoveInput(id) => {
|
||||
self.input_sources.remove_input_source(self, id);
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -432,6 +437,13 @@ impl XRSessionMethods for XRSession {
|
|||
SetOnvisibilitychange
|
||||
);
|
||||
|
||||
/// https://immersive-web.github.io/webxr/#eventdef-xrsession-inputsourceschange
|
||||
event_handler!(
|
||||
inputsourceschange,
|
||||
GetOninputsourceschange,
|
||||
SetOninputsourceschange
|
||||
);
|
||||
|
||||
// https://immersive-web.github.io/webxr/#dom-xrsession-renderstate
|
||||
fn RenderState(&self) -> DomRoot<XRRenderState> {
|
||||
self.active_render_state.get()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue