From bd12cf912de8f6f3fd09e1a08d84fc0924c057cc Mon Sep 17 00:00:00 2001 From: Chris Harrelson Date: Thu, 15 Aug 2024 10:32:08 -0700 Subject: [PATCH 1/6] Fix interaction of rAF with wrap --- book/embeds.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/book/embeds.md b/book/embeds.md index ad5d7a7dc..68d6b299b 100644 --- a/book/embeds.md +++ b/book/embeds.md @@ -961,10 +961,9 @@ class Tab: In this code I used a new `dispatch_RAF` method, which is just like the pre-iframe code but wraps the call for the specified `window_id`: -``` {.python} +``` {.python expected=False} class JSContext: def dispatch_RAF(self, window_id): - code = self.wrap("window.__runRAFHandlers()", window_id) self.interp.evaljs(code) ``` From 1f4b9f5faadf9fff31d35b7ee46c27a8f96f70a2 Mon Sep 17 00:00:00 2001 From: Chris Harrelson Date: Thu, 15 Aug 2024 10:42:10 -0700 Subject: [PATCH 2/6] none --- book/embeds.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/embeds.md b/book/embeds.md index 68d6b299b..4e5cb5126 100644 --- a/book/embeds.md +++ b/book/embeds.md @@ -961,7 +961,7 @@ class Tab: In this code I used a new `dispatch_RAF` method, which is just like the pre-iframe code but wraps the call for the specified `window_id`: -``` {.python expected=False} +``` {.python} class JSContext: def dispatch_RAF(self, window_id): self.interp.evaljs(code) From 7fd0d207a38f8a1f917a3f36ac691e752e1541e9 Mon Sep 17 00:00:00 2001 From: Chris Harrelson Date: Thu, 15 Aug 2024 10:54:50 -0700 Subject: [PATCH 3/6] none --- book/embeds.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book/embeds.md b/book/embeds.md index 4e5cb5126..bc7ebeeb9 100644 --- a/book/embeds.md +++ b/book/embeds.md @@ -959,11 +959,11 @@ class Tab: ``` In this code I used a new `dispatch_RAF` method, which is just like the -pre-iframe code but wraps the call for the specified `window_id`: +pre-iframe code: ``` {.python} class JSContext: - def dispatch_RAF(self, window_id): + def dispatch_RAF(self): self.interp.evaljs(code) ``` From bb12a33926e3ccee9a813ec772035f180c081a53 Mon Sep 17 00:00:00 2001 From: Chris Harrelson Date: Thu, 15 Aug 2024 10:55:58 -0700 Subject: [PATCH 4/6] none --- book/embeds.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/book/embeds.md b/book/embeds.md index bc7ebeeb9..ae69a3c3a 100644 --- a/book/embeds.md +++ b/book/embeds.md @@ -958,8 +958,7 @@ class Tab: # ... ``` -In this code I used a new `dispatch_RAF` method, which is just like the -pre-iframe code: +In this code I used a new `dispatch_RAF` method: ``` {.python} class JSContext: From 9152642fdee6d2007fec6da26ebd90133c306a30 Mon Sep 17 00:00:00 2001 From: Chris Harrelson Date: Thu, 15 Aug 2024 11:07:18 -0700 Subject: [PATCH 5/6] none --- book/embeds.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/embeds.md b/book/embeds.md index ae69a3c3a..4b7b4b13a 100644 --- a/book/embeds.md +++ b/book/embeds.md @@ -960,7 +960,7 @@ class Tab: In this code I used a new `dispatch_RAF` method: -``` {.python} +``` {.python expected=False} class JSContext: def dispatch_RAF(self): self.interp.evaljs(code) From b85f9723226c03dd3e0f5b16b9f3b598751e4b4d Mon Sep 17 00:00:00 2001 From: Chris Harrelson <3453258+chrishtr@users.noreply.github.com> Date: Fri, 16 Aug 2024 17:04:26 -0700 Subject: [PATCH 6/6] oops Co-authored-by: Pavel Panchekha --- book/embeds.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/embeds.md b/book/embeds.md index 4b7b4b13a..b80141d5d 100644 --- a/book/embeds.md +++ b/book/embeds.md @@ -963,7 +963,7 @@ In this code I used a new `dispatch_RAF` method: ``` {.python expected=False} class JSContext: def dispatch_RAF(self): - self.interp.evaljs(code) + self.interp.evaljs("window.__runRAFHandlers()") ``` Note that the `needs_accessibility`, `pending_hover`, and other flags