WebViewGAdget and 'core\add_NavigationCompleted' interface option
Posted: Fri May 10, 2024 11:18 am
Following the example given by Fred in this post (https://www.purebasic.fr/english/viewto ... 16#p615816), has anyone used (or knows how to use) the following option?
core\add_NavigationCompleted (to detect when a page has been fully loaded)
Fred sample code:
Thank you in advance
core\add_NavigationCompleted (to detect when a page has been fully loaded)
Fred sample code:
Code: Select all
OpenWindow(0, 100, 100, 400, 400, "Hello", #PB_Window_SystemMenu)
WebViewGadget(0, 0, 0, 400, 400, #PB_WebView_Debug)
; Get the ICoreController interface
;
Controller.ICoreWebView2Controller = GetGadgetAttribute(0, #PB_WebView_ICoreController)
; Get the ICoreWebView2 interface
;
Controller\get_CoreWebView2(@Core.ICoreWebView2)
Core\Navigate("https://www.purebasic.com")
;!!!!!!!!!!! I Don't know how to implement this :D
Repeat
Until ¿¿¿¿¿core\add_NavigationCompleted()????
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
DataSection
IID_ICoreWebView2Controller2:
Data.l $C979903E
Data.w $D4CA, $4228
Data.b $92, $EB, $47, $EE, $3F, $A9, $6E, $AB
EndDataSection
If Controller\QueryInterface(?IID_ICoreWebView2Controller2, @Controller2.ICoreWebView2Controller2) = #S_OK
Debug "ICoreWebView2Controller2 found: " + Controller2
Else
Debug "Can't query ICoreWebView2Controller2"
EndIf
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindowThank you in advance