chore: back-forward in bidi

This commit is contained in:
Yury Semikhatsky 2024-09-17 15:37:07 -07:00
parent ad70e7a783
commit 4c6019d308

View file

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