@@ -36,7 +36,7 @@ export class ContextManager extends SessionManager {
36
36
* Listens for the 'closeWindow' browser command to handle context changes.
37
37
* (classic + bidi)
38
38
*/
39
- this . #browser. on ( 'result' , this . #onCommandResultBidiAndClassic. bind ( this ) )
39
+ // this.#browser.on('result', this.#onCommandResultBidiAndClassic.bind(this))
40
40
41
41
if ( ! this . isEnabled ( ) ) {
42
42
return
@@ -58,23 +58,23 @@ export class ContextManager extends SessionManager {
58
58
59
59
removeListeners ( ) : void {
60
60
super . removeListeners ( )
61
- this . #browser. off ( 'result' , this . #onCommandResultBidiAndClassic. bind ( this ) )
61
+ // this.#browser.off('result', this.#onCommandResultBidiAndClassic.bind(this))
62
62
this . #browser. off ( 'command' , this . #onCommand. bind ( this ) )
63
63
if ( this . #browser. isMobile ) {
64
64
this . #browser. off ( 'result' , this . #onCommandResultMobile. bind ( this ) )
65
65
}
66
66
}
67
67
68
- #onCommandResultBidiAndClassic( event : { command : string , result : unknown } ) {
69
- /**
70
- * the `closeWindow` command returns:
71
- * > the result of running the remote end steps for the Get Window Handles command, with session, URL variables and parameters.
72
- */
73
- if ( event . command === 'closeWindow' ) {
74
- this . #currentContext = ( event . result as { value : string [ ] } ) . value [ 0 ]
75
- return this . #browser. switchToWindow ( this . #currentContext)
76
- }
77
- }
68
+ // #onCommandResultBidiAndClassic(event: { command: string, result: unknown }) {
69
+ // /**
70
+ // * the `closeWindow` command returns:
71
+ // * > the result of running the remote end steps for the Get Window Handles command, with session, URL variables and parameters.
72
+ // */
73
+ // if (event.command === 'closeWindow') {
74
+ // this.#currentContext = (event.result as { value: string[] }).value[0]
75
+ // return this.#browser.switchToWindow(this.#currentContext)
76
+ // }
77
+ // }
78
78
79
79
#onCommand( event : { command : string , body : unknown } ) {
80
80
/**
0 commit comments