aboutsummaryrefslogtreecommitdiffstats
path: root/src/extension.lisp
diff options
context:
space:
mode:
authorTeddy Wing2023-11-12 15:48:00 +0100
committerTeddy Wing2023-11-12 15:48:00 +0100
commit032d704f74a9cec209bef6a3a97109d0874ab331 (patch)
treeccf8f066a7fe12d0a94ab03547c8854b92798760 /src/extension.lisp
parentff7eb76be6e8a6aa1e5ee5f3cc3efac8455e9daf (diff)
downloadextreload-032d704f74a9cec209bef6a3a97109d0874ab331.tar.bz2
main: Attempt to use Inspector.targetCrashed to reload tab
I observed during a manual test with Websocat that Manifest V3 extensions trigger an `Inspector.targetCrashed` message after reloading the extension: {"id":1,"sessionId":"21A6A75608971AEAD68DB36701F9985C","method":"Runtime.evaluate","params":{"expression":"chrome.runtime.reload()"}} {"id":1,"result":{"result":{"type":"undefined"}},"sessionId":"21A6A75608971AEAD68DB36701F9985C"} {"method":"Inspector.targetCrashed","params":{},"sessionId":"21A6A75608971AEAD68DB36701F9985C"} Here, I tried to listen for that `Inspector.targetCrashed` message and use that to trigger a tab reload. Unfortunately, that doesn't seem to work, as in my Extreload test of this code, I don't see the `Inspector.targetCrashed` message. Looks like I'll have to find a different means of reloading Manifest V3 extension tabs.
Diffstat (limited to 'src/extension.lisp')
-rw-r--r--src/extension.lisp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/extension.lisp b/src/extension.lisp
index bc75fb9..9fe258c 100644
--- a/src/extension.lisp
+++ b/src/extension.lisp
@@ -5,6 +5,10 @@
:initarg :id
:reader id
:documentation "The extension's ID.")
+ (url
+ :initarg :url
+ :reader url
+ :documentation "The DevTools Protocol target URL.")
(session-id
:initarg :session-id
:reader session-id