Cleanup webview findwidget

This commit is contained in:
Matt Bierner
2018-02-14 23:19:15 -08:00
parent 57c65e2e17
commit 7f2cdefd1d
@@ -10,19 +10,15 @@ import { Webview } from './webview';
export class WebviewFindWidget extends SimpleFindWidget {
constructor(
@IContextViewService _contextViewService: IContextViewService,
private webview: Webview
@IContextViewService contextViewService: IContextViewService,
private readonly webview: Webview
) {
super(_contextViewService);
this.find = this.find.bind(this);
this.hide = this.hide.bind(this);
this.onInputChanged = this.onInputChanged.bind(this);
super(contextViewService);
}
public find(previous: boolean) {
let val = this.inputValue;
if (this.webview !== null && val) {
const val = this.inputValue;
if (val) {
this.webview.find(val, { findNext: true, forward: !previous });
}
}
@@ -34,11 +30,7 @@ export class WebviewFindWidget extends SimpleFindWidget {
}
public onInputChanged() {
if (!this.webview) {
return;
}
let val = this.inputValue;
const val = this.inputValue;
if (val) {
this.webview.startFind(val);
} else {