From 996ac3c3693d7883d9e120e31e9ab6f09f1d4072 Mon Sep 17 00:00:00 2001 From: Simon Pieters Date: Fri, 8 Apr 2022 16:22:54 +0200 Subject: [PATCH 1/4] Maybe throw NotSupportedError for createEvent('touchevent') See https://github.com/w3c/touch-events/issues/64 The term "expose legacy touch event APIs" was introduced in https://github.com/w3c/touch-events/pull/111 --- dom.bs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dom.bs b/dom.bs index 4f4a767a..55b73944 100644 --- a/dom.bs +++ b/dom.bs @@ -5390,6 +5390,11 @@ are:
  1. Let constructor be null. +

  2. +

    If interface is an ASCII case-insensitive match for "touchevent" + and the user agent's expose legacy touch event APIs is false, then throw a + "{{NotSupportedError!!exception}}" {{DOMException}}. +

  3. If interface is an ASCII case-insensitive match for any of the strings in the first column in the following table, then set constructor to the interface in the From 103b06e0f8c98f86cdc9c74f3cbc91b99a55320e Mon Sep 17 00:00:00 2001 From: Simon Pieters Date: Tue, 12 Apr 2022 13:34:24 +0200 Subject: [PATCH 2/4] Remove no-op step The TouchEvent interface is still exposed. --- dom.bs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/dom.bs b/dom.bs index 55b73944..d04ed6a9 100644 --- a/dom.bs +++ b/dom.bs @@ -5432,14 +5432,6 @@ are:

  4. If constructor is null, then throw a "{{NotSupportedError!!exception}}" {{DOMException}}. -

  5. -

    If the interface indicated by constructor is not exposed on the - relevant global object of this, then throw a - "{{NotSupportedError!!exception}}" {{DOMException}}. - -

    Typically user agents disable support for touch events in some configurations, in - which case this clause would be triggered for the interface {{TouchEvent}}. -

  6. Let event be the result of creating an event given constructor.

  7. Initialize event's {{Event/type}} attribute to the empty string. From 36d573abada2dd94b6ea60c803f00376f3043d43 Mon Sep 17 00:00:00 2001 From: Simon Pieters Date: Wed, 27 Apr 2022 13:22:41 +0200 Subject: [PATCH 3/4] Apply suggestions from code review --- dom.bs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dom.bs b/dom.bs index d04ed6a9..47947f84 100644 --- a/dom.bs +++ b/dom.bs @@ -5390,10 +5390,9 @@ are:

    1. Let constructor be null. -

    2. -

      If interface is an ASCII case-insensitive match for "touchevent" - and the user agent's expose legacy touch event APIs is false, then throw a - "{{NotSupportedError!!exception}}" {{DOMException}}. +

    3. If interface is an ASCII case-insensitive match for + "touchevent" and the user agent's expose legacy touch event APIs is false, then + throw a "{{NotSupportedError!!exception}}" {{DOMException}}.

    4. If interface is an ASCII case-insensitive match for any of the strings in the From d9fbce3284fc38fe8cf26adff20612e1b0428381 Mon Sep 17 00:00:00 2001 From: Simon Pieters Date: Mon, 2 May 2022 19:44:04 +0200 Subject: [PATCH 4/4] Add the term to

      
      ---
       dom.bs | 4 +++-
       1 file changed, 3 insertions(+), 1 deletion(-)
      
      diff --git a/dom.bs b/dom.bs
      index 47947f84..c0bac588 100644
      --- a/dom.bs
      +++ b/dom.bs
      @@ -37,6 +37,8 @@ urlPrefix: https://w3c.github.io/hr-time/#; spec: HR-TIME
        type:dfn; text: time origin; url: dfn-time-origin
        type:dfn; text: current high resolution time; url: dfn-current-high-resolution-time
        type:dfn; text: relative high resolution coarse time; url: dfn-relative-high-resolution-coarse-time
      +urlPrefix: https://w3c.github.io/touch-events/#; spec: TOUCH-EVENTS
      + type:dfn; urlPrefix: dfn-; text: expose legacy touch event APIs