This was handled by email.
For the rest reading along, it was a script error in the anonymous function.
So how does one figure that out?
The WebView2 control that the AntView control hosts is a full browser, it does come with a debugger.
As long as the developer tools haven't been disabled, you can use those debugging features for your benefit.
Right click on the rendered html and click "inspect" from the context menu. (Another way to invoke the debugger is to press F12 after clicking on the AntView control)
The next thing you should know is that the anonymous function is executed in the browser as a function "AntAnonymousFunction".
With those 2 tricks on your sleeve, you can now put a breakpoint.
First make sure the anonymous function was run at least once already (in our case we clicked the button that invoked the RunAnonymousFunction method that we want to debug)
Now type AntAnonymousFunction in the debug console, like so
double click on the function content and it opens a new tab.
This then is the debugger tab and you can put a breakpoint. I did put one on the "app" line and noticed that when I stepped over the function - after triggering it from VB6 - that it went into the void on the line "PlayerTime = "
After seeing that I triggered it again and now instead of stepping over the line I went to the console tab and tried it there.
This means that app.currentTime is not a function, but a variable!
By changing our script in the VB6 anonymous function to take that into account,
we now have it working without having to resort to async await or timers or anything else...
Hoping that this fixes it on your end as well.
--
Wil
For the rest reading along, it was a script error in the anonymous function.
So how does one figure that out?
The WebView2 control that the AntView control hosts is a full browser, it does come with a debugger.
As long as the developer tools haven't been disabled, you can use those debugging features for your benefit.
Right click on the rendered html and click "inspect" from the context menu. (Another way to invoke the debugger is to press F12 after clicking on the AntView control)
The next thing you should know is that the anonymous function is executed in the browser as a function "AntAnonymousFunction".
With those 2 tricks on your sleeve, you can now put a breakpoint.
First make sure the anonymous function was run at least once already (in our case we clicked the button that invoked the RunAnonymousFunction method that we want to debug)
Now type AntAnonymousFunction in the debug console, like so
double click on the function content and it opens a new tab.
This then is the debugger tab and you can put a breakpoint. I did put one on the "app" line and noticed that when I stepped over the function - after triggering it from VB6 - that it went into the void on the line "PlayerTime = "
After seeing that I triggered it again and now instead of stepping over the line I went to the console tab and tried it there.
This means that app.currentTime is not a function, but a variable!
By changing our script in the VB6 anonymous function to take that into account,
we now have it working without having to resort to async await or timers or anything else...
Hoping that this fixes it on your end as well.
--
Wil