- From: CVS User akostiai <cvsmail@w3.org>
- Date: Mon, 17 Nov 2014 13:01:38 +0000
- To: public-dap-commits@w3.org
Update of /sources/public/2009/dap/vibration In directory roscoe:/tmp/cvs-serv4396 Modified Files: PR.html PR.src.html Log Message: Editorial changes, keep in sync with ED. --- /sources/public/2009/dap/vibration/PR.html 2014/11/14 16:31:25 1.1 +++ /sources/public/2009/dap/vibration/PR.html 2014/11/17 13:01:37 1.2 @@ -428,7 +428,7 @@ width: 100%; } </style><link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/W3C-PR"><!--[if lt IE 9]><script src='https://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]--></head> - <body class="h-entry" role="document" id="respecDocument"><div class="head" role="contentinfo" id="respecHeader"> + <body style="" class="h-entry" role="document" id="respecDocument"><div class="head" role="contentinfo" id="respecHeader"> <p> @@ -514,11 +514,23 @@ </p> <p> - No substantive changes have been made - since the <a href="http://www.w3.org/TR/2014/CR-vibration-20140909/"> + The following editorial changes were made since the + <a href="http://www.w3.org/TR/2014/CR-vibration-20140909/"> <abbr title="World Wide Web Consortium">W3C</abbr> Candidate Recommendation 09 September 2014</a> - (<a href="PR-diff.html">diff</a>). + (<a href="PR-diff.html">diff</a>): </p> + <ul> + <li> + A dedicated name has been given to the + <a href="#dfn-vibration-pattern">vibration pattern</a>. + </li> + <li> + The + <a href="#dfn-validate-and-normalize">validate and normalize</a> and + <a href="#dfn-perform-vibration">perform vibration</a> algorithmss + were made standalone. + </li> + </ul> <p> This document represents the consensus of the group on the scope and features of the Vibration API. It should be noted that the group is @@ -656,13 +668,30 @@ for <a href="#dfn-processing-vibration-patterns" class="internalDFN">processing vibration patterns</a>. </p> <p> + The first method argument is referred to as + <dfn id="dfn-vibration-pattern">vibration pattern</dfn>. + </p> + <p> The rules for <dfn id="dfn-processing-vibration-patterns">processing vibration patterns</dfn> are as given in the following algorithm: </p> <ol> <li> - Let <var>pattern</var> be the value of the first argument. + Let <var>pattern</var> be the <a href="#dfn-vibration-pattern" class="internalDFN">vibration pattern</a>. + </li> + <li> + Let <var>valid pattern</var> be the result of passing + <var>pattern</var> to <a href="#dfn-validate-and-normalize" class="internalDFN">validate and normalize</a>. + </li> + <li> + <a href="#dfn-perform-vibration" class="internalDFN">Perform vibration</a> with <var>valid pattern</var>. </li> + </ol> + <p> + To <dfn id="dfn-validate-and-normalize">validate and normalize</dfn> a <a href="#dfn-vibration-pattern" class="internalDFN">vibration pattern</a> given + <var>pattern</var>, run these steps: + </p> + <ol> <li> If <var>pattern</var> is a list, proceed to the next step. Otherwise run the following substeps: @@ -713,6 +742,15 @@ <var>max duration</var>. </li> <li> + Return <var>pattern</var>. + </li> + </ol> + <p> + To <dfn id="dfn-perform-vibration">perform vibration</dfn> using <var>pattern</var>, run these + steps: + </p> + <ol> + <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 [<cite><a class="bibref" href="#bib-PAGE-VISIBILITY">PAGE-VISIBILITY</a></cite>] is set to true, @@ -782,7 +820,7 @@ <!--OddPage--><h2 role="heading" id="h2_examples"><span class="secno">5. </span>Examples</h2><p><em>This section is non-normative.</em></p> <p> In the following example the device will vibrate for 1000 milliseconds (ms): - </p><div class="example"><div class="example-title"><span>Example 1</span></div><pre class="example highlight prettyprint prettyprinted"><span class="com">// vibrate for 1000 ms</span><span class="pln"> + </p><div class="example"><div class="example-title"><span>Example 1</span></div><pre class="example highlight prettyprint prettyprinted" style=""><span class="com">// vibrate for 1000 ms</span><span class="pln"> navigator</span><span class="pun">.</span><span class="pln">vibrate</span><span class="pun">(</span><span class="lit">1000</span><span class="pun">);</span><span class="pln"> </span><span class="com">// or alternatively</span><span class="pln"> @@ -791,12 +829,12 @@ In the following example the pattern will cause the device to vibrate for 50 ms, be still for 100 ms, and then vibrate for 150 ms: </p> - <div class="example"><div class="example-title"><span>Example 2</span></div><pre class="example highlight prettyprint prettyprinted"><span class="pln">navigator</span><span class="pun">.</span><span class="pln">vibrate</span><span class="pun">([</span><span class="lit">50</span><span class="pun">,</span><span class="pln"> </span><span class="lit">100</span><span class="pun">,</span><span class="pln"> </span><span class="lit">150</span><span class="pun">]);</span></pre></div> + <div class="example"><div class="example-title"><span>Example 2</span></div><pre class="example highlight prettyprint prettyprinted" style=""><span class="pln">navigator</span><span class="pun">.</span><span class="pln">vibrate</span><span class="pun">([</span><span class="lit">50</span><span class="pun">,</span><span class="pln"> </span><span class="lit">100</span><span class="pun">,</span><span class="pln"> </span><span class="lit">150</span><span class="pun">]);</span></pre></div> <p> </p><p> The following example cancels any existing vibrations: </p> - <div class="example"><div class="example-title"><span>Example 3</span></div><pre class="example highlight prettyprint prettyprinted"><span class="com">// cancel any existing vibrations</span><span class="pln"> + <div class="example"><div class="example-title"><span>Example 3</span></div><pre class="example highlight prettyprint prettyprinted" style=""><span class="com">// cancel any existing vibrations</span><span class="pln"> navigator</span><span class="pun">.</span><span class="pln">vibrate</span><span class="pun">(</span><span class="lit">0</span><span class="pun">);</span><span class="pln"> </span><span class="com">// or alternatively</span><span class="pln"> --- /sources/public/2009/dap/vibration/PR.src.html 2014/11/14 16:31:25 1.1 +++ /sources/public/2009/dap/vibration/PR.src.html 2014/11/17 13:01:37 1.2 @@ -38,11 +38,23 @@ <section id='sotd'> <p> - No substantive changes have been made - since the <a href="http://www.w3.org/TR/2014/CR-vibration-20140909/"> + The following editorial changes were made since the + <a href="http://www.w3.org/TR/2014/CR-vibration-20140909/"> W3C Candidate Recommendation 09 September 2014</a> - (<a href="PR-diff.html">diff</a>). + (<a href="PR-diff.html">diff</a>): </p> + <ul> + <li> + A dedicated name has been given to the + <a href="#dfn-vibration-pattern">vibration pattern</a>. + </li> + <li> + The + <a href="#dfn-validate-and-normalize">validate and normalize</a> and + <a href="#dfn-perform-vibration">perform vibration</a> algorithmss + were made standalone. + </li> + </ul> <p> This document represents the consensus of the group on the scope and features of the Vibration API. It should be noted that the group is @@ -107,13 +119,30 @@ for <a>processing vibration patterns</a>. </p> <p> + The first method argument is referred to as + <dfn>vibration pattern</dfn>. + </p> + <p> The rules for <dfn>processing vibration patterns</dfn> are as given in the following algorithm: </p> <ol> <li> - Let <var>pattern</var> be the value of the first argument. + Let <var>pattern</var> be the <a>vibration pattern</a>. + </li> + <li> + Let <var>valid pattern</var> be the result of passing + <var>pattern</var> to <a>validate and normalize</a>. + </li> + <li> + <a>Perform vibration</a> with <var>valid pattern</var>. </li> + </ol> + <p> + To <dfn>validate and normalize</dfn> a <a>vibration pattern</a> given + <var>pattern</var>, run these steps: + </p> + <ol> <li> If <var>pattern</var> is a list, proceed to the next step. Otherwise run the following substeps: @@ -164,6 +193,15 @@ <var>max duration</var>. </li> <li> + Return <var>pattern</var>. + </li> + </ol> + <p> + To <dfn>perform vibration</dfn> using <var>pattern</var>, run these + steps: + </p> + <ol> + <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,
Received on Monday, 17 November 2014 13:01:39 UTC