R2D221 / WebView2.DOM

C# DOM bindings to be used with WebView2
MIT License
51 stars 10 forks source link

About getting the current content of a document #2

Open wf-soft opened 3 years ago

wf-soft commented 3 years ago

For example, when I click the button to run JS, I find that what I get from the document content is not the final document content, it is a document when some content is not fully loaded

wf-soft commented 3 years ago

Maybe it's because the content in ifram is empty. How can I load the ifram completely without opening a new window。

R2D221 commented 3 years ago

Sorry, I haven't tested iframes yet.

When you use DOMContentLoaded directly in C#, it should fire when the document is fully loaded, but the resources not yet.

Maybe you could try with the NavigationCompleted event instead.

wf-soft commented 3 years ago

Yes, it seems that the contents of the iframe cannot be obtained。

wf-soft commented 3 years ago

Even if the page is fully loaded, I can't get it from window.document Get htmliframeelement content

wf-soft commented 3 years ago

Maybe this is a cross domain problem