Skip to content

Commit

Permalink
feat: support in-page overlay while recording (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgozman authored Nov 14, 2023
1 parent 64a4e33 commit 8a0439b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/reusedBrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,16 @@ export class ReusedBrowser implements vscodeTypes.Disposable {
});

this._backend.on('inspectRequested', params => {
if (!this._updateOrCancelInspecting)
this._showInspectingBox();
this._updateOrCancelInspecting?.({ selector: params.locator || params.selector });
});

this._backend.on('setModeRequested', params => {
if (params.mode === 'standby')
this._reset(false);
});

this._backend.on('paused', async params => {
if (!this._pausedOnPagePause && params.paused) {
this._pausedOnPagePause = true;
Expand Down Expand Up @@ -267,6 +274,10 @@ export class ReusedBrowser implements vscodeTypes.Disposable {
return;
}

this._showInspectingBox();
}

private _showInspectingBox() {
const selectorExplorerBox = this._vscode.window.createInputBox();
selectorExplorerBox.title = this._vscode.l10n.t('Pick locator');
selectorExplorerBox.value = '';
Expand Down

0 comments on commit 8a0439b

Please sign in to comment.