File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -549,11 +549,16 @@ pub const Page = struct {
549549 .body = opts .body != null ,
550550 });
551551
552- // if the url is about:blank, nothing to do.
552+ // if the url is about:blank, we load an empty HTML document in the
553+ // page and dispatch the events.
553554 if (std .mem .eql (u8 , "about:blank" , request_url )) {
554555 const html_doc = try parser .documentHTMLParseFromStr ("" );
555556 try self .setDocument (html_doc );
556557
558+ // Assume we parsed the document.
559+ // It's important to force a reset during the following navigation.
560+ self .mode = .parsed ;
561+
557562 // We do not processHTMLDoc here as we know we don't have any scripts
558563 // This assumption may be false when CDP Page.addScriptToEvaluateOnNewDocument is implemented
559564 self .documentIsComplete ();
You can’t perform that action at this time.
0 commit comments