1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-24 23:26:50 +02:00

Plugins: Added support for bi-directional messages in content scripts and webview scripts using postMessage

This commit is contained in:
Laurent Cozic
2021-01-11 23:33:10 +00:00
parent cbad3b1190
commit 2489409abb
23 changed files with 574 additions and 128 deletions

View File

@ -1,5 +1,9 @@
import { ViewHandle } from './utils/createViewHandle';
export interface EmitMessageEvent {
message: any;
}
export default class ViewController {
private handle_: ViewHandle;
@ -36,7 +40,7 @@ export default class ViewController {
throw new Error('Must be overriden');
}
public emitMessage(event: any) {
public async emitMessage(event: EmitMessageEvent): Promise<any> {
console.info('Calling ViewController.emitMessage - but not implemented', event);
}