[FIX] devtools: fix display and message passing for firefox

This commit fixes 2 issues specific to the firefox version of the
extension:
First issue concerns the computation the position of the
border between the subwindows of the components tab which could go
terribly wrong due to the fact that the innerwidth of the window is
implicitly set to 10 when the owl devtools window is hidden.
Second issue comes from changes in the runtime.onMessage method of
browser which now requires to directly return the response instead of
using the sendResponse method.
Also perform a little cleanup on usage of browserInstance and in the
manifest.
This commit is contained in:
Julien Carion (juca)
2023-10-18 13:31:57 +02:00
committed by Géry Debongnie
parent fee3eecd7f
commit fb013ccc72
8 changed files with 20 additions and 24 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
import { IS_FIREFOX } from "../utils";
import { IS_FIREFOX, browserInstance } from "../utils";
let created = false;
let browserInstance = IS_FIREFOX ? browser : chrome;
// Try to load the owl panel each 1000 ms in case it (re)appears on the page later on
const checkInterval = setInterval(createPanelsIfOwl, 1000);