Skip to content

Commit 4b91ea6

Browse files
authored
Merge pull request #91 from Psychpsyo/patch-1
Replace void with undefined in IDL fragments
2 parents 8bf3947 + 2a4085a commit 4b91ea6

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

explainer.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ interface XRTest {
2121
// Simulates a user activation (aka user gesture) for the current scope.
2222
// The activation is only guaranteed to be valid in the provided function and only applies to WebXR
2323
// Device API methods.
24-
void simulateUserActivation(Function f);
24+
undefined simulateUserActivation(Function f);
2525
2626
// Disconnect all fake devices
27-
Promise<void> disconnectAllDevices();
27+
Promise<undefined> disconnectAllDevices();
2828
};
2929
```
3030

@@ -71,31 +71,31 @@ dictionary FakeXRDeviceInit {
7171
interface FakeXRDevice {
7272
// Sets the values to be used for subsequent
7373
// requestAnimationFrame() callbacks.
74-
void setViews(sequence<FakeXRViewInit> primaryViews, sequence<FakeXRViewInit> secondaryViews);
74+
undefined setViews(sequence<FakeXRViewInit> primaryViews, sequence<FakeXRViewInit> secondaryViews);
7575
7676
// behaves as if device was disconnected
77-
Promise<void> disconnect();
77+
Promise<undefined> disconnect();
7878
7979
// Sets the origin of the viewer
80-
void setViewerOrigin(FakeXRRigidTransformInit origin, optional boolean emulatedPosition = false);
80+
undefined setViewerOrigin(FakeXRRigidTransformInit origin, optional boolean emulatedPosition = false);
8181
8282
// If an origin is not specified, then the device is assumed to not be tracking, emulatedPosition should
8383
// be assumed for cases where the UA must always provide a pose.
84-
void clearViewerOrigin();
84+
undefined clearViewerOrigin();
8585
8686
// Simulates devices focusing and blurring sessions.
87-
void simulateVisibilityChange(XRVisibilityState state);
87+
undefined simulateVisibilityChange(XRVisibilityState state);
8888
89-
void setBoundsGeometry(sequence<FakeXRBoundsPoint> boundsCoordinates);
89+
undefined setBoundsGeometry(sequence<FakeXRBoundsPoint> boundsCoordinates);
9090
// Sets the native origin of the physical floor
91-
void setFloorOrigin(FakeXRRigidTransformInit floorOrigin);
91+
undefined setFloorOrigin(FakeXRRigidTransformInit floorOrigin);
9292
9393
// Indicates that the device can no longer identify the location of the physical floor.
94-
void clearFloorOrigin();
94+
undefined clearFloorOrigin();
9595
9696
// Used to simulate a major change in tracking and that a reset pose event should be fired
9797
// https://immersive-web.github.io/webxr/#event-types
98-
void simulateResetPose();
98+
undefined simulateResetPose();
9999
100100
// Used to connect and send input events
101101
FakeXRInputController simulateInputSourceConnection(FakeXRInputSourceInit init);
@@ -176,49 +176,49 @@ dictionary FakeXRInputSourceInit {
176176
interface FakeXRInputController {
177177
178178
// Indicates that the handedness of the device has changed.
179-
void setHandedness(XRHandedness handedness);
179+
undefined setHandedness(XRHandedness handedness);
180180
181181
// Indicates that the target ray mode of the device has changed.
182-
void setTargetRayMode(XRTargetRayMode targetRayMode);
182+
undefined setTargetRayMode(XRTargetRayMode targetRayMode);
183183
184184
// Indicates that the list of profiles representing the device has changed.
185-
void setProfiles(sequence<DOMString> profiles);
185+
undefined setProfiles(sequence<DOMString> profiles);
186186
187187
// Sets or clears the position of the controller. If not set, the controller is assumed to
188188
// not be tracked.
189-
void setGripOrigin(FakeXRRigidTransformInit gripOrigin, optional boolean emulatedPosition = false);
190-
void clearGripOrigin();
189+
undefined setGripOrigin(FakeXRRigidTransformInit gripOrigin, optional boolean emulatedPosition = false);
190+
undefined clearGripOrigin();
191191
192192
// Sets the pointer origin for the controller.
193-
void setPointerOrigin(FakeXRRigidTransformInit pointerOrigin, optional boolean emulatedPosition = false);
193+
undefined setPointerOrigin(FakeXRRigidTransformInit pointerOrigin, optional boolean emulatedPosition = false);
194194
195195
// Temporarily disconnect the input device
196-
void disconnect();
196+
undefined disconnect();
197197
198198
// Reconnect a disconnected input device
199-
void reconnect();
199+
undefined reconnect();
200200
201201
// Start a selection for the current frame with the primary input
202202
// If a gamepad is supported, should update the state of the primary button accordingly.
203-
void startSelection();
203+
undefined startSelection();
204204
205205
// End selection for the current frame with the primary input
206206
// If a gamepad is supported, should update the state of the primary button accordingly.
207-
void endSelection();
207+
undefined endSelection();
208208
209209
// Simulates a start/endSelection for the current frame with the primary input
210210
// If a gamepad is supported, should update the state of the primary button accordingly.
211-
void simulateSelect();
211+
undefined simulateSelect();
212212
213213
// Updates the set of supported buttons, including any initial state.
214214
// Note that this method should not be generally used to update the state of the
215215
// buttons, as the UA may treat this as re-creating the Gamepad.
216216
// Note that if any FakeXRButtonType is repeated the behavior is undefined.
217-
void setSupportedButtons(sequence<FakeXRButtonStateInit> supportedButtons);
217+
undefined setSupportedButtons(sequence<FakeXRButtonStateInit> supportedButtons);
218218
219219
// Used to update the state of a button currently supported by the input source
220220
// Will not add support for that button if it is not currently supported.
221-
void updateButtonState(FakeXRButtonStateInit buttonState);
221+
undefined updateButtonState(FakeXRButtonStateInit buttonState);
222222
};
223223
224224
// Bcause the primary button is always guaranteed to be present, and other buttons
@@ -258,9 +258,9 @@ In order to create deterministic and cross-browser WPT tests for the proposed We
258258
```webidl
259259
partial interface FakeXRDevice {
260260
// Sets new world state on the device.
261-
void setWorld(FakeXRWorldInit world);
261+
undefined setWorld(FakeXRWorldInit world);
262262
// Clears the entire knowledge of the world on the device.
263-
void clearWorld();
263+
undefined clearWorld();
264264
};
265265
266266
partial dictionary FakeXRDeviceInit {
@@ -304,6 +304,6 @@ In order to create deterministic and cross-browser WPT tests for the proposed We
304304
```webidl
305305
partial interface FakeXRInputController {
306306
// Sets the position within the DOM Overlay in DOM coordinates for the next controller action.
307-
void setOverlayPointerPosition(float x, float y);
307+
undefined setOverlayPointerPosition(float x, float y);
308308
};
309309
```

0 commit comments

Comments
 (0)