Skip to content

Commit 86839d2

Browse files
Manishearthtoji
authored andcommitted
Move session request feature before session creation
1 parent 5b03071 commit 86839d2

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,15 +368,15 @@ 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|.
376374
1. If |status|' {{PermissionStatus/state}} is {{PermissionState/"denied"}} run the following steps:
377375
1. [=Reject=] |promise| with a "{{NotSupportedError}}" {{DOMException}}.
378376
1. If |immersive| is <code>true</code>, set [=pending immersive session=] to <code>false</code>.
379377
1. Abort these steps.
378+
1. Let |session| be a new {{XRSession}} object.
379+
1. [=Initialize the session=] with |session|, |mode|, and |device|.
380380
1. Potentially set the [=active immersive session=] as follows:
381381
<dl class="switch">
382382
<dt> If |immersive| is <code>true</code>

0 commit comments

Comments
 (0)