From fb8b4d28ce47171a83a7bf5148293fd2318cc02f Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Thu, 16 May 2019 21:35:58 +0900 Subject: Hints as a classes --- src/content/client/TabsClient.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/content/client') 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; + openUrl(url: string, newTab: boolean, background?: boolean): Promise; // eslint-disable-next-line semi } -export class TabsClientImpl { - async openUrl(url: string, newTab: boolean): Promise { +export class TabsClientImpl implements TabsClient { + async openUrl( + url: string, + newTab: boolean, + background?: boolean, + ): Promise { await browser.runtime.sendMessage({ type: messages.OPEN_URL, url, newTab, + background, }); } } - -- cgit v1.2.3