Skip to content

Commit

Permalink
Vibration API Recommendation errata
Browse files Browse the repository at this point in the history
These non-normative changes align the Vibration API spec with the
latest Page Visibility API spec by tapping into its hooks defined
post-Vibration API Recommendation publication:

- determine if the document is hidden
- visibility states

In addition, terminology is clarified as follows:

- browsing context -> top-level browsing context
  • Loading branch information
anssiko committed Feb 9, 2016
1 parent c6203ad commit b844ba9
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ <h2>
</h2>
<p>
The concepts <dfn><a href=
"http://www.w3.org/TR/html5/browsers.html#browsing-context">browsing
context</a></dfn> and <dfn><a href=
"https://www.w3.org/TR/html5/browsers.html#top-level-browsing-context">top-level
browsing context</a></dfn> and <dfn><a href=
"http://www.w3.org/TR/html5/webappapis.html#spin-the-event-loop">spin
the event loop</a></dfn> are defined in [[!HTML5]].
</p>
Expand Down Expand Up @@ -149,10 +149,10 @@ <h2>
<li>Let <var>valid pattern</var> be the result of passing
<var>pattern</var> to <a>validate and normalize</a>.
</li>
<li>If the <code><a href=
"http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html#dom-document-hidden">
hidden</a></code> attribute [[!PAGE-VISIBILITY]] is set to true, then
return false and terminate these steps.
<li>If the result of running the steps to <a href=
"https://w3c.github.io/page-visibility/#dfn-steps-to-determine-if-the-document-is-hidden">
determine if the document is hidden</a> [[!PAGE-VISIBILITY]] is true,
then return false and terminate these steps.
<div class="note">
A trusted (also known as privileged) application that integrates
closely with the operating system's functionality may vibrate the
Expand Down Expand Up @@ -222,11 +222,12 @@ <h2>
<ol>
<li>An implementation MAY return false and terminate these steps.
<div class="note">
For example, an implementation might abort the algorithm because
the user has set a preference indicating that pages at a given
origin should never be able to vibrate the device, or an
implementation might cap the total amount of time a page may cause
the device to vibrate and reject requests in excess of this limit.
For example, an implementation might abort the algorithm because no
vibration hardware is present, the user has set a preference
indicating that pages at a given origin should never be able to
vibrate the device, or an implementation might cap the total amount
of time a page may cause the device to vibrate and reject requests
in excess of this limit.
</div>
</li>
<li>If another instance of the <a>perform vibration</a> algorithm is
Expand Down Expand Up @@ -255,12 +256,11 @@ <h2>
</li>
</ol>
<p>
When the <code><a href=
"http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html#sec-visibilitychange-event">
visibilitychange</a></code> event [[!PAGE-VISIBILITY]] is dispatched at
the <code>Document</code> in a <a>browsing context</a>, the <a class=
"product-ua" href="#ua">user agent</a> MUST abort the already running
<a>processing vibration patterns</a> algorithm, if any.
When the user agent determines that the <a href=
"https://w3c.github.io/page-visibility/#dfn-visibility-states">visibility
state</a> of the <code>Document</code> of the <a>top-level browsing
context</a> changes, it MUST abort the already running <a>processing
vibration patterns</a> algorithm, if any.
</p>
</section>
<section class='informative'>
Expand Down

0 comments on commit b844ba9

Please sign in to comment.