diff options
author | Teddy Wing | 2023-11-12 15:48:00 +0100 |
---|---|---|
committer | Teddy Wing | 2023-11-12 15:48:00 +0100 |
commit | 032d704f74a9cec209bef6a3a97109d0874ab331 (patch) | |
tree | ccf8f066a7fe12d0a94ab03547c8854b92798760 /src/extension.lisp | |
parent | ff7eb76be6e8a6aa1e5ee5f3cc3efac8455e9daf (diff) | |
download | extreload-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.lisp | 4 |
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 |