liusong1111 / synapse-extension

MIT License
0 stars 0 forks source link

[refactor] introduce `closePopup` function #10

Open liusong1111 opened 4 years ago

liusong1111 commented 4 years ago

https://github.com/rebase-network/synapse-extension/blob/af0985a81b5a6d578b3605bb459b4487283ffab4/src/background/messageHandlers/proxy.ts#L8-L9

      const windowId = await getLastWindowId();
      browser.windows.remove(windowId);

wrap them into closePopup:

https://github.com/rebase-network/synapse-extension/blob/43f755ddd45e130a857c92f9624dc537b65e9d39/src/common/popup/index.ts