Skip to content

[BUG]: _NetWebView2_Navigate() with pdfJS is not waiting for all processing #87

@mlipok

Description

@mlipok

What happened?

#85 (comment)

even if you use:

;~ 	$oWeb.Navigate($s_Viewer_URL)
	_NetWebView2_Navigate($oWeb, $s_Viewer_URL, $NETWEBVIEW2_MESSAGE__TITLE_CHANGED, 5000)

then you get:

+> ( NetWebView2Lib UDF : SLN=1560 ) :: [NetWebView2Lib:EVENT: OnTitleChanged]: GUI:[HANDLE:0x00360A52] TITLE: PDF.js viewer
! we're done with navigation, but check how many more messages there are below. SLN=249
+> ( NetWebView2Lib UDF : SLN=1560 ) :: [NetWebView2Lib:EVENT: OnTitleChanged]: GUI:[HANDLE:0x00360A52] TITLE: invoice-plugin-sample.pdf
+> ( NetWebView2Lib UDF : SLN=1560 ) :: [NetWebView2Lib:EVENT: OnTitleChanged]: GUI:[HANDLE:0x00360A52] TITLE: PDF Invoice Example - invoice-plugin-sample.pdf

this means that you are not able to fully wait on the loading process ends.

But I have some Idea on later.

What did you expect to happen?

_NetWebView2_Navigate() should have possibility to define which exact title is expected.

Which steps did you take to reproduce the bug?

check example:
Update 014-pdfJS-Static_PDF_Viewer.au3

using this PR
#85

Screenshots

Image

Version

latest version

Older or unknown version?

No response

Do you want to work on this issue/fix?

Yes

What system are you running?

  • Windows 11 (x64)
  • Windows 10 (x64)
  • Windows 10 (x86)
  • other Windows version
  • other operating system

Any additional context?

I think it will be related not only to pdfjs but also other cases, and because of that it is so important

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginvalidThis doesn't seem right

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions