@@ -103,7 +103,7 @@ export class BidiPage implements PageDelegate {
103103 }
104104
105105 private _onFrameAttached ( frameId : string , parentFrameId : string | null ) : frames . Frame {
106- return this . _page . _frameManager . frameAttached ( frameId , parentFrameId ) ;
106+ return this . _page . frameManager . frameAttached ( frameId , parentFrameId ) ;
107107 }
108108
109109 private _removeContextsForFrame ( frame : frames . Frame , notifyFrame : boolean ) {
@@ -121,7 +121,7 @@ export class BidiPage implements PageDelegate {
121121 return ;
122122 if ( realmInfo . type !== 'window' )
123123 return ;
124- const frame = this . _page . _frameManager . frame ( realmInfo . context ) ;
124+ const frame = this . _page . frameManager . frame ( realmInfo . context ) ;
125125 if ( ! frame )
126126 return ;
127127 let worldName : types . World ;
@@ -172,47 +172,47 @@ export class BidiPage implements PageDelegate {
172172
173173 private _onNavigationStarted ( params : bidi . BrowsingContext . NavigationInfo ) {
174174 const frameId = params . context ;
175- this . _page . _frameManager . frameRequestedNavigation ( frameId , params . navigation ! ) ;
175+ this . _page . frameManager . frameRequestedNavigation ( frameId , params . navigation ! ) ;
176176
177177 const url = params . url . toLowerCase ( ) ;
178178 if ( url . startsWith ( 'file:' ) || url . startsWith ( 'data:' ) || url === 'about:blank' ) {
179179 // Navigation to file urls doesn't emit network events, so we fire 'commit' event right when navigation is started.
180180 // Doing it in domcontentload would be too late as we'd clear frame tree.
181- const frame = this . _page . _frameManager . frame ( frameId ) ! ;
181+ const frame = this . _page . frameManager . frame ( frameId ) ! ;
182182 if ( frame )
183- this . _page . _frameManager . frameCommittedNewDocumentNavigation ( frameId , params . url , '' , params . navigation ! , /* initial */ false ) ;
183+ this . _page . frameManager . frameCommittedNewDocumentNavigation ( frameId , params . url , '' , params . navigation ! , /* initial */ false ) ;
184184 }
185185 }
186186
187187 // TODO: there is no separate event for committed navigation, so we approximate it with responseStarted.
188188 private _onNavigationResponseStarted ( params : bidi . Network . ResponseStartedParameters ) {
189189 const frameId = params . context ! ;
190- const frame = this . _page . _frameManager . frame ( frameId ) ;
190+ const frame = this . _page . frameManager . frame ( frameId ) ;
191191 assert ( frame ) ;
192- this . _page . _frameManager . frameCommittedNewDocumentNavigation ( frameId , params . response . url , '' , params . navigation ! , /* initial */ false ) ;
192+ this . _page . frameManager . frameCommittedNewDocumentNavigation ( frameId , params . response . url , '' , params . navigation ! , /* initial */ false ) ;
193193 // if (!initial)
194194 // this._firstNonInitialNavigationCommittedFulfill();
195195 }
196196
197197 private _onDomContentLoaded ( params : bidi . BrowsingContext . NavigationInfo ) {
198198 const frameId = params . context ;
199- this . _page . _frameManager . frameLifecycleEvent ( frameId , 'domcontentloaded' ) ;
199+ this . _page . frameManager . frameLifecycleEvent ( frameId , 'domcontentloaded' ) ;
200200 }
201201
202202 private _onLoad ( params : bidi . BrowsingContext . NavigationInfo ) {
203- this . _page . _frameManager . frameLifecycleEvent ( params . context , 'load' ) ;
203+ this . _page . frameManager . frameLifecycleEvent ( params . context , 'load' ) ;
204204 }
205205
206206 private _onNavigationAborted ( params : bidi . BrowsingContext . NavigationInfo ) {
207- this . _page . _frameManager . frameAbortedNavigation ( params . context , 'Navigation aborted' , params . navigation || undefined ) ;
207+ this . _page . frameManager . frameAbortedNavigation ( params . context , 'Navigation aborted' , params . navigation || undefined ) ;
208208 }
209209
210210 private _onNavigationFailed ( params : bidi . BrowsingContext . NavigationInfo ) {
211- this . _page . _frameManager . frameAbortedNavigation ( params . context , 'Navigation failed' , params . navigation || undefined ) ;
211+ this . _page . frameManager . frameAbortedNavigation ( params . context , 'Navigation failed' , params . navigation || undefined ) ;
212212 }
213213
214214 private _onFragmentNavigated ( params : bidi . BrowsingContext . NavigationInfo ) {
215- this . _page . _frameManager . frameCommittedSameDocumentNavigation ( params . context , params . url ) ;
215+ this . _page . frameManager . frameCommittedSameDocumentNavigation ( params . context , params . url ) ;
216216 }
217217
218218 private _onUserPromptOpened ( event : bidi . BrowsingContext . UserPromptOpenedParameters ) {
@@ -235,7 +235,7 @@ export class BidiPage implements PageDelegate {
235235 return ;
236236 const callFrame = params . stackTrace ?. callFrames [ 0 ] ;
237237 const location = callFrame ?? { url : '' , lineNumber : 1 , columnNumber : 1 } ;
238- this . _page . _addConsoleMessage ( entry . method , entry . args . map ( arg => createHandle ( context , arg ) ) , location , params . text || undefined ) ;
238+ this . _page . addConsoleMessage ( entry . method , entry . args . map ( arg => createHandle ( context , arg ) ) , location , params . text || undefined ) ;
239239 }
240240
241241 async navigateFrame ( frame : frames . Frame , url : string , referrer : string | undefined ) : Promise < frames . GotoResult > {
@@ -328,7 +328,7 @@ export class BidiPage implements PageDelegate {
328328 return ;
329329 if ( event . data . type !== 'string' )
330330 return ;
331- await this . _page . _onBindingCalled ( event . data . value , context ) ;
331+ await this . _page . onBindingCalled ( event . data . value , context ) ;
332332 }
333333
334334 async addInitScript ( initScript : InitScript ) : Promise < void > {
@@ -380,7 +380,7 @@ export class BidiPage implements PageDelegate {
380380 const frameId = await executionContext . contentFrameIdForFrame ( handle ) ;
381381 if ( ! frameId )
382382 return null ;
383- return this . _page . _frameManager . frame ( frameId ) ;
383+ return this . _page . frameManager . frame ( frameId ) ;
384384 }
385385
386386 async getOwnerFrame ( handle : dom . ElementHandle ) : Promise < string | null > {
0 commit comments