mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(wk): wait for bootstrap scripts command response (#328)
This commit is contained in:
parent
3f0eaa2350
commit
6e0bb2585e
@ -71,7 +71,7 @@ export class WKFrameManager implements PageDelegate {
|
|||||||
// New bootstrap scripts may have been added during provisional load, push them
|
// New bootstrap scripts may have been added during provisional load, push them
|
||||||
// again to be on the safe side.
|
// again to be on the safe side.
|
||||||
if (this._setBootstrapScripts.length)
|
if (this._setBootstrapScripts.length)
|
||||||
this._setBootstrapScripts(session);
|
this._setBootstrapScripts(session).catch(e => debugError(e));
|
||||||
}
|
}
|
||||||
|
|
||||||
// This method is called for provisional targets as well. The session passed as the parameter
|
// This method is called for provisional targets as well. The session passed as the parameter
|
||||||
@ -100,7 +100,7 @@ export class WKFrameManager implements PageDelegate {
|
|||||||
if (contextOptions.javaScriptEnabled === false)
|
if (contextOptions.javaScriptEnabled === false)
|
||||||
promises.push(session.send('Emulation.setJavaScriptEnabled', { enabled: false }));
|
promises.push(session.send('Emulation.setJavaScriptEnabled', { enabled: false }));
|
||||||
if (this._setBootstrapScripts.length && session.isProvisional())
|
if (this._setBootstrapScripts.length && session.isProvisional())
|
||||||
this._setBootstrapScripts(session);
|
promises.push(this._setBootstrapScripts(session));
|
||||||
if (contextOptions.bypassCSP)
|
if (contextOptions.bypassCSP)
|
||||||
promises.push(session.send('Page.setBypassCSP', { enabled: true }));
|
promises.push(session.send('Page.setBypassCSP', { enabled: true }));
|
||||||
if (this._page._state.extraHTTPHeaders !== null)
|
if (this._page._state.extraHTTPHeaders !== null)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user