Skip to content

Commit 20568ac

Browse files
committed
Move session request feature before session creation
1 parent a9b3fc3 commit 20568ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.bs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,6 @@ When this method is invoked, the user agent MUST run the following steps:
368368
1. [=Reject=] |promise| with a "{{NotSupportedError}}" {{DOMException}}.
369369
1. If |immersive| is <code>true</code>, set [=pending immersive session=] to <code>false</code>.
370370
1. Abort these steps.
371-
1. Let |session| be a new {{XRSession}} object.
372-
1. [=Initialize the session=] with |session|, |mode|, and |device|.
373371
1. Let |descriptor| be an {{XRPermissionDescriptor}} initialized with |mode|, |requiredFeatures|, and |optionalFeatures|
374372
1. Let |status| be an {{XRPermissionStatus}}, initially <code>null</code>
375373
1. [=Request the xr permission=] with |descriptor| and |status|.
@@ -384,6 +382,8 @@ When this method is invoked, the user agent MUST run the following steps:
384382
<dt> Otherwise
385383
<dd> Append |session| to the [=list of inline sessions=].
386384
</dl>
385+
1. Let |session| be a new {{XRSession}} object.
386+
1. [=Initialize the session=] with |session|, |mode|, and |device|.
387387
1. [=/Resolve=] |promise| with |session|.
388388
1. [=Queue a task=] to perform the following steps:
389389
NOTE: These steps ensure that initial <code>inputsourceschange</code> events occur after the initial session is resolved.

0 commit comments

Comments
 (0)