add create webview event and fix fire event in model view (#2405)

This commit is contained in:
Abbie Petchtes
2018-09-05 14:07:52 -07:00
committed by GitHub
parent b7f4f6af3a
commit 534bbe9b9a
17 changed files with 39 additions and 20 deletions

View File

@@ -67,8 +67,8 @@ export default class ButtonComponent extends ComponentWithIconBase implements IC
let reader = new FileReader();
reader.onload = (e) => {
let text = (<FileReader>e.target).result;
self.fileContent = text;
self._onEventEmitter.fire({
self.fileContent = text.toString();
self.fireEvent({
eventType: ComponentEventType.onDidClick,
args: self.fileContent
});
@@ -76,7 +76,7 @@ export default class ButtonComponent extends ComponentWithIconBase implements IC
reader.readAsText(file);
};
} else {
this._onEventEmitter.fire({
this.fireEvent({
eventType: ComponentEventType.onDidClick,
args: e
});