Skip to content

Commit

Permalink
Use standard 'postMessage' name
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbvz committed Apr 17, 2018
1 parent fbd3a08 commit cdd9a73
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/vs/workbench/api/electron-browser/mainThreadWebview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export class MainThreadWebviews implements MainThreadWebviewsShape, WebviewReviv
this._webviewService.revealWebview(webview, column);
}

async $sendMessage(handle: WebviewPanelHandle, message: any): TPromise<boolean> {
async $postMessage(handle: WebviewPanelHandle, message: any): TPromise<boolean> {
const webview = this.getWebview(handle);
const editors = this._editorService.getVisibleEditors()
.filter(e => e instanceof WebviewEditor)
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/api/node/extHost.protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ export interface MainThreadWebviewsShape extends IDisposable {
$reveal(handle: WebviewPanelHandle, column: EditorPosition): void;
$setTitle(handle: WebviewPanelHandle, value: string): void;
$setHtml(handle: WebviewPanelHandle, value: string): void;
$sendMessage(handle: WebviewPanelHandle, value: any): Thenable<boolean>;
$postMessage(handle: WebviewPanelHandle, value: any): Thenable<boolean>;

$registerSerializer(viewType: string): void;
$unregisterSerializer(viewType: string): void;
Expand Down
4 changes: 2 additions & 2 deletions src/vs/workbench/api/node/extHostWebview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class ExtHostWebview implements vscode.Webview {

public postMessage(message: any): Thenable<boolean> {
this.assertNotDisposed();
return this._proxy.$sendMessage(this._handle, message);
return this._proxy.$postMessage(this._handle, message);
}

public reveal(viewColumn: vscode.ViewColumn): void {
Expand Down Expand Up @@ -173,7 +173,7 @@ export class ExtHostWebviewPanel implements vscode.WebviewPanel {

public postMessage(message: any): Thenable<boolean> {
this.assertNotDisposed();
return this._proxy.$sendMessage(this._handle, message);
return this._proxy.$postMessage(this._handle, message);
}

public reveal(viewColumn: vscode.ViewColumn): void {
Expand Down

0 comments on commit cdd9a73

Please sign in to comment.