chore: back-forward in bidi
This commit is contained in:
parent
ad70e7a783
commit
4c6019d308
|
|
@ -315,12 +315,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> {
|
||||
|
|
|
|||
Loading…
Reference in a new issue