Skip to content

Commit

Permalink
Promise are part of WebIDL.
Browse files Browse the repository at this point in the history
  • Loading branch information
mounirlamouri committed Nov 1, 2017
1 parent f832e87 commit fe3aed3
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,6 @@ <h2>
list of the descendant browsing contexts</a></dfn>
</li>
</ul>
<p>
<a href=
'http://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects'>
<dfn>Promise</dfn> objects</a> are defined in [[!ECMASCRIPT]].
</p>
<p>
<dfn><a href=
'https://fullscreen.spec.whatwg.org/#fullscreen-element'>fullscreen
Expand Down Expand Up @@ -249,7 +244,7 @@ <h2>
</p>
<p class='note'>
<a data-link-for='ScreenOrientation' data-lt='unlock'>unlock()</a> does not
return a Promise because it is equivalent to locking to the
return a promise because it is equivalent to locking to the
<a>default orientation</a> which might or might not be known by the
<a>user agent</a>. Hence, the <a>user agent</a> can not predict what
the new orientation is going to be and even if it is going to change
Expand Down Expand Up @@ -314,8 +309,8 @@ <h2>
<p>
Algorithms defined in this specification assume that for each
<a>document</a> there is a <dfn>pending promise</dfn>, which is
initially set to <code>null</code>, which is a <a>Promise</a> object
whose associated operation is to lock the screen orientation.
initially set to <code>null</code>, which is a promise whose
associated operation is to lock the screen orientation.
</p>
<section>
<h2>
Expand Down Expand Up @@ -425,7 +420,7 @@ <h2>
</p>
<ol>
<li>If the <a>user agent</a> does not support locking the screen
orientation, return a <a>Promise</a> rejected with a
orientation, return a promise rejected with a
<code>DOMException</code> whose name is
<code>NotSupportedError</code> and abort these steps.
</li>
Expand Down Expand Up @@ -459,8 +454,8 @@ <h2>
<li>If the <a>document</a>'s <a>active sandboxing flag set</a> has
the <a>sandboxed orientation lock browsing context flag</a> set, or
<a>user agent</a> doesn't meet the <a>security conditions</a> to
perform an orientation change, return a <a>Promise</a> rejected with
a <code>DOMException</code> whose name is <code>SecurityError</code>
perform an orientation change, return a promise rejected with a
<code>DOMException</code> whose name is <code>SecurityError</code>
and abort these steps.
</li>
<li>Let <var>orientations</var> be an empty list.
Expand Down Expand Up @@ -517,8 +512,7 @@ <h2>
</dd>
</dl>
</li>
<li>Set <var>pending-promise</var> to be a newly-created
<a>Promise</a>.
<li>Set <var>pending-promise</var> to be a newly-create a promise.
</li>
<li>Return <var>pending-promise</var> and continue asynchronously.
</li>
Expand Down

0 comments on commit fe3aed3

Please sign in to comment.