Skip to content

Commit 7f2cdef

Browse files
committed
Cleanup webview findwidget
1 parent 57c65e2 commit 7f2cdef

1 file changed

Lines changed: 6 additions & 14 deletions

File tree

src/vs/workbench/parts/html/browser/webviewFindWidget.ts

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,15 @@ import { Webview } from './webview';
1010
export class WebviewFindWidget extends SimpleFindWidget {
1111

1212
constructor(
13-
@IContextViewService _contextViewService: IContextViewService,
14-
private webview: Webview
13+
@IContextViewService contextViewService: IContextViewService,
14+
private readonly webview: Webview
1515
) {
16-
super(_contextViewService);
17-
18-
this.find = this.find.bind(this);
19-
this.hide = this.hide.bind(this);
20-
this.onInputChanged = this.onInputChanged.bind(this);
16+
super(contextViewService);
2117
}
2218

2319
public find(previous: boolean) {
24-
let val = this.inputValue;
25-
if (this.webview !== null && val) {
20+
const val = this.inputValue;
21+
if (val) {
2622
this.webview.find(val, { findNext: true, forward: !previous });
2723
}
2824
}
@@ -34,11 +30,7 @@ export class WebviewFindWidget extends SimpleFindWidget {
3430
}
3531

3632
public onInputChanged() {
37-
if (!this.webview) {
38-
return;
39-
}
40-
41-
let val = this.inputValue;
33+
const val = this.inputValue;
4234
if (val) {
4335
this.webview.startFind(val);
4436
} else {

0 commit comments

Comments
 (0)