From 9e0769a365ae246d5d8eb46d876c72c8840819e1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcos=20C=C3=A1ceres?=
Date: Wed, 1 Jun 2022 13:39:35 +1000
Subject: [PATCH 1/2] check and consume user activation
---
index.html | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/index.html b/index.html
index 8b6511e..235152d 100644
--- a/index.html
+++ b/index.html
@@ -574,7 +574,12 @@
The subscribe() method when invoked MUST run the following steps:
- - Let |promise| be [=a new promise=].
+
- If the [=relevant global object=] of [=this=] does not have [=transient activation=],
+ return [=a promise rejected with=] with a {{"NotAllowedError"}} {{DOMException}}.
+
+ - [=Consume user activation=] of [=this=]'s [=relevant global object=].
+
+ - Let |promise| be a new promise.
- Let |global| be [=this=]' [=relevant global object=].
From bb5fb01fad2cc330ab6784ad535d853f474ab4f2 Mon Sep 17 00:00:00 2001
From: Marcos Caceres
Date: Thu, 14 Dec 2023 16:36:01 +1100
Subject: [PATCH 2/2] Check if global is Window object
---
index.html | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/index.html b/index.html
index 235152d..c32a059 100644
--- a/index.html
+++ b/index.html
@@ -574,15 +574,19 @@
The subscribe() method when invoked MUST run the following steps:
- - If the [=relevant global object=] of [=this=] does not have [=transient activation=],
- return [=a promise rejected with=] with a {{"NotAllowedError"}} {{DOMException}}.
+
- Let |global| be the [=relevant global object=] of [=this=].
- - [=Consume user activation=] of [=this=]'s [=relevant global object=].
+
- If |global| is a {{Window}} object:
+
+ - If |global| does not have [=transient activation=], return [=a promise rejected
+ with=] with a {{"NotAllowedError"}} {{DOMException}}.
+
+ - [=Consume user activation=] of |global|.
+
+
- Let |promise| be a new promise.
- - Let |global| be [=this=]' [=relevant global object=].
-
- Return |promise| and continue [=in parallel=].