chore: back-forward in bidi (#32670)

This commit is contained in:
Yury Semikhatsky 2024-09-17 16:02:13 -07:00 committed by GitHub
parent 375a1c4982
commit 8b84b20dd0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 4 deletions

View File

@ -319,12 +319,18 @@ export class BidiPage implements PageDelegate {
});
}
goBack(): Promise<boolean> {
throw new Error('Method not implemented.');
async goBack(): Promise<boolean> {
return await this._session.send('browsingContext.traverseHistory', {
context: this._session.sessionId,
delta: -1,
}).then(() => true).catch(() => false);
}
goForward(): Promise<boolean> {
throw new Error('Method not implemented.');
async goForward(): Promise<boolean> {
return await this._session.send('browsingContext.traverseHistory', {
context: this._session.sessionId,
delta: +1,
}).then(() => true).catch(() => false);
}
async forceGarbageCollection(): Promise<void> {