|
-
Mar 24th, 2023, 12:27 PM
#10
Re: VB6 WebView2-Binding (Edge-Chromium)
 Originally Posted by tmighty2
Sorry to ask again, but can you please show me an example?
My problem is that I don't know how to access the hotspots that the function returns.
I have tried this:
Dim hotspots
hotspots = WV.jsRun("window._grid_ensureHotSpotIds")
Debug.Print UBound(hotspots) 'here it errors out saying "Type mismatch" (obviously it's not an array. It's empty)
You will have to check in your js-source, whether the window._grid_ensureHotSpotIds function,
returns something at all...
And if it does, then gather these results in your own array -
and then return this array as a serialized JSON-string via:
return JSON.stringify(myHotspotArray)
At the vb6-side you can then easily convert that returned JSON-string into a cCollection:
Dim oHotSpots As cCollection
Set oHotSpots = New_c.JSONDecodeToCollection(WV.jsRun("window._grid_ensureHotSpotIds"))
HTH
Olaf
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|