File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed
Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -726,22 +726,17 @@ export class Converter {
726726 this . trackFailedLocalFileAccess ( page )
727727
728728 const render = async ( ) => {
729+ const waitUntil = 'domcontentloaded' as const
730+
729731 if ( uri ) {
730- await page . goto ( uri , {
731- waitUntil : [ 'domcontentloaded' , 'networkidle0' ] ,
732- } )
732+ await page . goto ( uri , { waitUntil } )
733733 } else {
734- await page . goto ( 'data:text/html,' , {
735- waitUntil : [ 'domcontentloaded' , 'networkidle0' ] ,
736- } )
737-
738- // https://github.com/marp-team/marp-cli/issues/682 -- Use page.waitForNetworkIdle() instead of `waitUntil: 'networkidle0'`
739- await page . setContent ( baseFile . buffer ! . toString ( ) , {
740- waitUntil : 'domcontentloaded' ,
741- } )
742- await page . waitForNetworkIdle ( )
734+ await page . goto ( 'data:text/html,' , { waitUntil } )
735+ await page . setContent ( baseFile . buffer ! . toString ( ) , { waitUntil } )
743736 }
744737
738+ await page . waitForNetworkIdle ( )
739+
745740 // Wait for next frame (In parallel rendering, it may be needed to wait for the first rendering)
746741 await page . evaluate ( async ( ) => {
747742 /* c8 ignore start */
You can’t perform that action at this time.
0 commit comments