diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-25 21:55:45 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-25 22:16:49 +0900 |
commit | 48e005dc825a5211b4d3e92ed06ad15e01c23d13 (patch) | |
tree | 255ffc7841f33292a00f5bf0e11e4c4c854fe975 /src/content/client | |
parent | a2ee6897bfbb95a0cca50ab11042aaf94c5de77c (diff) |
Repeat open, tabopen and winopen command
Diffstat (limited to 'src/content/client')
-rw-r--r-- | src/content/client/OperationClient.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/content/client/OperationClient.ts b/src/content/client/OperationClient.ts index d699fec..5dbe555 100644 --- a/src/content/client/OperationClient.ts +++ b/src/content/client/OperationClient.ts @@ -3,6 +3,10 @@ import * as messages from '../../shared/messages'; export default interface OperationClient { execBackgroundOp(op: operations.Operation): Promise<void>; + + internalOpenUrl( + url: string, newTab?: boolean, background?: boolean, + ): Promise<void>; } export class OperationClientImpl implements OperationClient { @@ -12,4 +16,18 @@ export class OperationClientImpl implements OperationClient { operation: op, }); } + + internalOpenUrl( + url: string, newTab?: boolean, background?: boolean, + ): Promise<void> { + return browser.runtime.sendMessage({ + type: messages.BACKGROUND_OPERATION, + operation: { + type: operations.INTERNAL_OPEN_URL, + url, + newTab, + background, + }, + }); + } } |