diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-11 17:45:58 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-11 17:45:58 +0900 |
commit | 8cef5981b808bc1713170627c88dc26ca81063c1 (patch) | |
tree | 6e1af4a4888bfcd9dcb64df00438ad97c5e5c392 /src/content/client | |
parent | c6288f19d93a05f96274dd172450b8350389c39f (diff) |
Clipbaord as a clean architecture
Diffstat (limited to 'src/content/client')
-rw-r--r-- | src/content/client/TabsClient.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/content/client/TabsClient.ts b/src/content/client/TabsClient.ts new file mode 100644 index 0000000..fe72e11 --- /dev/null +++ b/src/content/client/TabsClient.ts @@ -0,0 +1,18 @@ +import * as messages from '../../shared/messages'; + +export default interface TabsClient { + openUrl(url: string, newTab: boolean): Promise<void>; + + // eslint-disable-next-line semi +} + +export class TabsClientImpl { + async openUrl(url: string, newTab: boolean): Promise<void> { + await browser.runtime.sendMessage({ + type: messages.OPEN_URL, + url, + newTab, + }); + } +} + |