Commit 2647911 1 parent 601d57a commit 2647911 Copy full SHA for 2647911
File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -635,11 +635,11 @@ export class Frame {
635
635
async setContent ( html : string , options ?: types . NavigateOptions ) : Promise < void > {
636
636
const tag = `--playwright--set--content--${ this . _id } --${ ++ this . _setContentCounter } --` ;
637
637
const context = await this . _utilityContext ( ) ;
638
- const lifecyclePromise = new Promise ( resolve => {
638
+ const lifecyclePromise = new Promise ( ( resolve , reject ) => {
639
639
this . _page . _frameManager . _consoleMessageTags . set ( tag , ( ) => {
640
640
// Clear lifecycle right after document.open() - see 'tag' below.
641
641
this . _page . _frameManager . clearFrameLifecycle ( this ) ;
642
- resolve ( this . _waitForLoadState ( options ) ) ;
642
+ this . _waitForLoadState ( options ) . then ( resolve ) . catch ( reject ) ;
643
643
} ) ;
644
644
} ) ;
645
645
const contentPromise = context . evaluate ( ( html , tag ) => {
You can’t perform that action at this time.
0 commit comments