diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2021-03-28 12:41:22 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-28 12:41:22 +0900 |
commit | 0f561ad10b0946692913a56290816ed5022d91e3 (patch) | |
tree | e6b40d24a0770a5e39281d2f3c7145e9560b97f9 /src/background/clients | |
parent | 9d77f734fc5556217ddff14af6b067dfbea92854 (diff) | |
parent | 5a7a3dbb6638fdb8d349c3c4360e6ea916ca7f7d (diff) |
Merge pull request #1069 from ueokande/reciving-error-on-tab-opened
Diffstat (limited to 'src/background/clients')
-rw-r--r-- | src/background/clients/ConsoleFrameClient.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/background/clients/ConsoleFrameClient.ts b/src/background/clients/ConsoleFrameClient.ts new file mode 100644 index 0000000..170566d --- /dev/null +++ b/src/background/clients/ConsoleFrameClient.ts @@ -0,0 +1,15 @@ +import * as messages from "../../shared/messages"; + +export default interface ConsoleFrameClient { + resize(tabId: number, width: number, height: number): Promise<void>; +} + +export class ConsoleFrameClientImpl implements ConsoleFrameClient { + async resize(tabId: number, width: number, height: number): Promise<void> { + await browser.tabs.sendMessage(tabId, { + type: messages.CONSOLE_RESIZE, + width, + height, + }); + } +} |