diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-16 21:35:58 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-17 23:06:27 +0900 |
commit | fb8b4d28ce47171a83a7bf5148293fd2318cc02f (patch) | |
tree | 02e23efe01d38adeb6dafb6794bc1d3e4866a055 /src/content/client/TabsClient.ts | |
parent | 8cef5981b808bc1713170627c88dc26ca81063c1 (diff) |
Hints as a classes
Diffstat (limited to 'src/content/client/TabsClient.ts')
-rw-r--r-- | src/content/client/TabsClient.ts | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/content/client/TabsClient.ts b/src/content/client/TabsClient.ts index fe72e11..e1af078 100644 --- a/src/content/client/TabsClient.ts +++ b/src/content/client/TabsClient.ts @@ -1,18 +1,22 @@ import * as messages from '../../shared/messages'; export default interface TabsClient { - openUrl(url: string, newTab: boolean): Promise<void>; + openUrl(url: string, newTab: boolean, background?: boolean): Promise<void>; // eslint-disable-next-line semi } -export class TabsClientImpl { - async openUrl(url: string, newTab: boolean): Promise<void> { +export class TabsClientImpl implements TabsClient { + async openUrl( + url: string, + newTab: boolean, + background?: boolean, + ): Promise<void> { await browser.runtime.sendMessage({ type: messages.OPEN_URL, url, newTab, + background, }); } } - |