A fork of https://github.com/ueokande/vim-vixen
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
625 B
23 lines
625 B
import * as messages from '../../shared/messages'; |
|
|
|
export default interface FindClient { |
|
getGlobalLastKeyword(): Promise<string | null>; |
|
|
|
setGlobalLastKeyword(keyword: string): Promise<void>; |
|
} |
|
|
|
export class FindClientImpl implements FindClient { |
|
async getGlobalLastKeyword(): Promise<string | null> { |
|
let keyword = await browser.runtime.sendMessage({ |
|
type: messages.FIND_GET_KEYWORD, |
|
}); |
|
return keyword as string; |
|
} |
|
|
|
async setGlobalLastKeyword(keyword: string): Promise<void> { |
|
await browser.runtime.sendMessage({ |
|
type: messages.FIND_SET_KEYWORD, |
|
keyword: keyword, |
|
}); |
|
} |
|
}
|
|
|