Reduce usage of postCommand in markdown preview

This commit is contained in:
Matt Bierner
2018-09-21 13:23:48 -07:00
parent 47ec1a664e
commit 7185906189
9 changed files with 15 additions and 29 deletions

View File

@@ -30,7 +30,7 @@ export class StyleLoadingMonitor {
}
this.finishedLoading = true;
if (this.poster) {
this.poster.postCommand('_markdown.onPreviewStyleLoadError', [this.unloadedStyles]);
this.poster.postMessage('previewStyleLoadError', { unloadedStyles: this.unloadedStyles });
}
});
}
@@ -38,7 +38,7 @@ export class StyleLoadingMonitor {
public setPoster(poster: MessagePoster): void {
this.poster = poster;
if (this.finishedLoading) {
poster.postCommand('_markdown.onPreviewStyleLoadError', [this.unloadedStyles]);
poster.postMessage('previewStyleLoadError', { unloadedStyles: this.unloadedStyles });
}
}
}