diff --git a/src/vs/workbench/parts/html/browser/webviewFindWidget.ts b/src/vs/workbench/parts/html/browser/webviewFindWidget.ts
index cd8f76cfb39..f304d2f56eb 100644
--- a/src/vs/workbench/parts/html/browser/webviewFindWidget.ts
+++ b/src/vs/workbench/parts/html/browser/webviewFindWidget.ts
@@ -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 {