From 41d039ece8a0cfb43ef7ec818dabf9156fc956d3 Mon Sep 17 00:00:00 2001 From: Anssi Kostiainen Date: Wed, 25 May 2022 14:30:31 +0300 Subject: [PATCH 1/4] Require sticky activation to perform vibrate Also: - Add dfns: this, relevant global object, sticky activation - Remove unused refs: spin the event loop, Navigator - Link to the "user agent" dfn (Future work: refactor to use the fancier ref syntax.) Fix #29 --- index.html | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index ee66bce..b1492e2 100644 --- a/index.html +++ b/index.html @@ -120,11 +120,16 @@

The concepts top-level - browsing context and spin - the event loop and the - Navigator interface are defined in [[!HTML]]. + browsing context, + relevant global object and + sticky activation + are defined in [[!HTML]]. +

+

+ The concept this + is defined in [[!WEBIDL]].

@@ -226,6 +231,10 @@

steps:

    +
  1. + If this's relevant global object does not have + sticky activation, return false and terminate these steps. +
  2. An implementation MAY return false and terminate these steps.
    For example, an implementation might abort the algorithm because no @@ -262,7 +271,7 @@

- When the user agent determines that the user agent determines that the visibility state of the Document of the top-level browsing context changes, it MUST abort the already running processing @@ -288,9 +297,9 @@

enable physical identification, and possibly tracking of the user.

- For these reasons, the user agent SHOULD inform the user when the API - is being used and provide a mechanism to disable the API (effectively - no-op), on a per-origin basis or globally. + For these reasons, the user agent SHOULD inform the user when + the API is being used and provide a mechanism to disable the API + (effectively no-op), on a per-origin basis or globally.

From a406e764dd4155c69a4cba4ca1ac15c7b5f47587 Mon Sep 17 00:00:00 2001 From: Anssi Kostiainen Date: Mon, 30 May 2022 15:29:33 +0300 Subject: [PATCH 2/4] Pass 'this' to 'perform vibration' algorithm Also use new method steps prose for vibrate() --- index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index b1492e2..087b849 100644 --- a/index.html +++ b/index.html @@ -144,9 +144,9 @@

};

- The vibrate() method, - when invoked, MUST run the algorithm for processing vibration - patterns. A vibration pattern is represented by a + The vibrate() method + steps are to run the processing vibration patterns algorithm. + A vibration pattern is represented by a VibratePattern object.

@@ -172,7 +172,7 @@

  • - Perform vibration with valid pattern. + Perform vibration with this and valid pattern.
  • @@ -227,8 +227,8 @@

    - To perform vibration using pattern, run these - steps: + To perform vibration using this and pattern, + run these steps:

    1. From 80df1c0f10f88370bdf498096d3b4d537d0b92d5 Mon Sep 17 00:00:00 2001 From: Anssi Kostiainen Date: Mon, 30 May 2022 15:32:56 +0300 Subject: [PATCH 3/4] Autogenerate refs, remove manual refs and Terminology section --- index.html | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/index.html b/index.html index 087b849..fd222e1 100644 --- a/index.html +++ b/index.html @@ -28,6 +28,9 @@ testSuiteURI: "https://w3c-test.org/vibration/", implementationReportURI: "https://w3c.github.io/test-results/vibration/20141118.html", processVersion: 2017, + xref: { + profile: "web-platform" + }, localBiblio: { "NOTIFICATIONS": { title: "Notifications API", @@ -113,25 +116,6 @@

      as this specification uses that specification and terminology.

    -
    -

    - Terminology -

    -

    - The concepts top-level - browsing context, - relevant global object and - sticky activation - are defined in [[!HTML]]. -

    -

    - The concept this - is defined in [[!WEBIDL]]. -

    -

    Vibration Interface From 167cf3c6b2131b3d4d2fd0d2678ca3b3a7bfec29 Mon Sep 17 00:00:00 2001 From: Anssi Kostiainen Date: Mon, 30 May 2022 18:51:20 +0300 Subject: [PATCH 4/4] Pass "this's relevant global object" to "perform vibration" This is clearer. --- index.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index fd222e1..d1e087f 100644 --- a/index.html +++ b/index.html @@ -156,7 +156,8 @@

  • - Perform vibration with this and valid pattern. + Perform vibration with this's relevant global object + and valid pattern.
  • @@ -211,13 +212,14 @@

    - To perform vibration using this and pattern, + To perform vibration using a global object + global and a vibration pattern pattern, run these steps:

    1. - If this's relevant global object does not have - sticky activation, return false and terminate these steps. + If global does not have sticky activation, + return false and terminate these steps.
    2. An implementation MAY return false and terminate these steps.