From 032d704f74a9cec209bef6a3a97109d0874ab331 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 12 Nov 2023 15:48:00 +0100 Subject: 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. --- src/extension.lisp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/extension.lisp') 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 -- cgit v1.2.3