-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to get the HTML content in WebView2? #354
Comments
There's an extended control here that has a DocumentHTML property |
@ukandrewc Thanks a lot for sharing, I noticed your project depends on this library Aimco.DOMWebView2, however, our project has strict restrictions on third-party libraries, so that might not be a good option in our case, thanks for your advice anyway. |
This question has been asked a few times, and as yet, there doesn't seem to be a direct way. |
This new event WebResourceResponseReceived was released in 0.9.579 days ago, we might be able to get the page content from that event, but I didn't find such event in the wpf version, not sure if I did something wrong, or it isn't available for .net version yet. |
I was also looking for a way to access the HTML DOM. In particular I need to find an element and scroll to that element. It's disappointing that it's not accessible in the WPF WebView2. |
It is accessible, just async and you need to execute JS to do it: |
Ahh, thanks for the tip @ukandrewc! |
Tracked in #77 |
Is there a way to get the HTML content in WebView2? I noticed the HTTP response and the HTML content might be retrieved in this experimental event WebResourceResponseReceived, but it's not available in the WPF version yet, so could you advise if there's any other alternatives at this moment? Thank you.
The text was updated successfully, but these errors were encountered: