WebView2.DOM icon indicating copy to clipboard operation
WebView2.DOM copied to clipboard

About getting the current content of a document

Open wf-soft opened this issue 5 years ago • 5 comments

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 avatar Nov 24 '20 04:11 wf-soft

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

wf-soft avatar Nov 24 '20 06:11 wf-soft

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.

R2D221 avatar Nov 24 '20 06:11 R2D221

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

wf-soft avatar Nov 24 '20 09:11 wf-soft

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

wf-soft avatar Nov 24 '20 09:11 wf-soft

Maybe this is a cross domain problem

wf-soft avatar Nov 24 '20 10:11 wf-soft