fix(page): page.close() assert that connection is not closed (#1038)
This commit is contained in:
parent
e943efe1e3
commit
b3857bd690
@ -201,6 +201,7 @@ class Session extends EventEmitter {
|
||||
}
|
||||
|
||||
async dispose() {
|
||||
console.assert(!!this._connection, 'Protocol error: Connection closed. Most likely the page has been closed.');
|
||||
await this._connection.send('Target.closeTarget', {targetId: this._targetId});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user