Add vscode namespace in webview

From discussion around #48540
This commit is contained in:
Matt Bierner
2018-04-25 15:33:30 -07:00
parent 2272f36e59
commit f36cae36dc
4 changed files with 33 additions and 9 deletions

View File

@@ -5,15 +5,17 @@
import { getSettings } from './settings';
declare var vscode: any;
/**
* Post a message to the markdown extension
*/
export function postMessage(type: string, body: object) {
window.parent.postMessage({
vscode.postMessage({
type,
source: getSettings().source,
body
}, '*');
});
}
/**