Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolving the promise after the change event is fired #147

Merged
merged 3 commits into from Feb 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
59 changes: 29 additions & 30 deletions index.html
Expand Up @@ -1065,27 +1065,26 @@ <h2>
<li>
<a>Update the orientation information</a> of <var>doc</var>.
</li>
<li>If <var>doc</var>'s <a>[[\orientationPendingPromise]]</a> is
not <code>null</code>:
<ol>
<li>Resolve <var>doc</var>'s
<a>[[\orientationPendingPromise]]</a> with
<code>undefined</code>.
</li>
<li>Set <var>doc</var>'s
<a>[[\orientationPendingPromise]]</a> to <code>null</code> .
</li>
</ol>
</li>
<li>If the orientation change was triggered by a user gesture
such as the user turning the device, as opposed to a call to <a>
lock()</a>, the <a>task</a> MUST be annotated with
<code>process user orientation change</code> when running the
next step.
</ol>
</li>
<li>If the orientation change was triggered by a user gesture such as
the user turning the device, as opposed to a call to <a>lock()</a>,
the <a>task</a> MUST be annotated with <code>process user orientation
change</code> when running the next step.
</li>
<li>
<a>Fire an event</a> named <code>change</code> at <var>doc</var>'s
<a>screen.orientation</a> object.
</li>
<li>If <var>doc</var>'s <a>[[\orientationPendingPromise]]</a> is not
<code>null</code>:
<ol>
<li>Resolve <var>doc</var>'s
<a>[[\orientationPendingPromise]]</a> with
<code>undefined</code>.
</li>
<li>
<a>Fire an event</a> named <code>change</code> at
<var>doc</var>'s <a>screen.orientation</a> object.
<li>Set <var>doc</var>'s <a>[[\orientationPendingPromise]]</a> to
<code>null</code> .
</li>
</ol>
</li>
Expand All @@ -1109,6 +1108,16 @@ <h2>
<a>document</a>'s <a>current orientation angle</a>, run the following
sub-steps:
<ol>
<li>If the orientation change was triggered by a user gesture
such as the user turning the device, as opposed to a call to <a>
lock()</a>, the <a>task</a> MUST be annotated with
<code>process user orientation change</code> when running the
next step.
</li>
<li>
<a>Fire an event</a> named <code>change</code> at the
<a>document</a>'s <a>screen.orientation</a> object.
</li>
<li>If the <a>document</a>'s
<a>[[\orientationPendingPromise]]</a> is not <code>null</code>:
<ol>
Expand All @@ -1121,16 +1130,6 @@ <h2>
</li>
</ol>
</li>
<li>If the orientation change was triggered by a user gesture
such as the user turning the device, as opposed to a call to <a>
lock()</a>, the <a>task</a> MUST be annotated with
<code>process user orientation change</code> when running the
next step.
</li>
<li>
<a>Fire an event</a> named <code>change</code> at the
<a>document</a>'s <a>screen.orientation</a> object.
</li>
</ol>
</li>
</ol>
Expand Down