Skip to content

Commit

Permalink
Test console
Browse files Browse the repository at this point in the history
  • Loading branch information
mrruby committed Jul 18, 2024
1 parent d1d8da8 commit 905c55d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion holo-key-manager-extension/scripts/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const createOrUpdateWindow = (
windowProperties: WindowProperties,
handleWindowUpdateOrCreate: () => Promise<void>
) => {
console.log(2);
const onWindowCreated = (newWindow: chrome.windows.Window | undefined) => {
if (!newWindow) return;
windowId = newWindow.id;
Expand All @@ -71,6 +72,8 @@ const createOrUpdateWindow = (
handleWindowUpdateOrCreate();
};

console.log(windowId);

if (windowId) {
chrome.windows.remove(windowId, () => {
windowId = undefined;
Expand Down Expand Up @@ -138,7 +141,7 @@ const processMessageWebApp = async (
) => {
try {
if (!(await isSetupComplete())) {
console.log(JSON.stringify(parsedMessage));
console.log('1');
return updateOrCreateWindow(NEEDS_SETUP, sendResponseWithSender);
}
switch (parsedMessage.action) {
Expand Down

0 comments on commit 905c55d

Please sign in to comment.