Diga.WebView2
Diga.WebView2 copied to clipboard
GetDomWindow.frames
When trying to access GetDOMWindow.frames.item(0) it states this is ambiguous since there is a property named the same is there anyway to update this so they are seperate names I am unable to get each frame due to this error.
I’m trying to work around it but when I do the getDomDocument.getElementbyId(“iframeid”) and Assign to a DOMElement I can not get the document out of the element ? So that I can search the iframe document for specific ids.
You're right, currently the frames property doesn't return a list of window items. You can only access an IFrame element by its ID. You cannot access the window object of the frame via this element. This will be implemented at a later date. However, you could use the webView1_FrameCreated event to pass your own objects to the frame and run your own scripts in the frame. https://docs.microsoft.com/de-de/microsoft-edge/webview2/reference/win32/icorewebview2frame?view=webview2-1.0.1343.22#addhostobjecttoscriptwithorigins https://docs.microsoft.com/de-de/microsoft-edge/webview2/reference/win32/icorewebview2frame2?view=webview2-1.0.1343.22#executescript
Ok would it be possible to get the src of the iframe and open a window using the src
If you got the IFrame DOMElement you can call GetPorperty("srcdoc") https://www.w3schools.com/tags/tag_iframe.asp