Skip to content

Commit 2d46001

Browse files
authored
Update NetWebView2Lib.au3
1 parent 0b5db0a commit 2d46001

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

NetWebView2Lib.au3

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
Global $_g_hNetWebView2Lib_DLL = ''
1414
Global $_g_oWeb
1515
Global $g_DebugInfo = True
16-
Global $g_sProfilePath = @TempDir & "\UserDataFolder"
17-
1816
_Example()
1917

2018
#Region ; NetWebView2Lib UDF
@@ -298,7 +296,8 @@ Func _Example()
298296
ObjEvent($oWebV2M, "__NetWebView2_WebEvents_", "IWebViewEvents")
299297

300298
; Important: Pass $hGUI in parentheses to maintain Pointer type for COM
301-
$oWebV2M.Initialize($hGUI, $g_sProfilePath, 0, 50, 500, 600)
299+
Local $sProfileDirectory = @TempDir & "\NetWebView2Lib-UserDataFolder"
300+
$oWebV2M.Initialize($hGUI, $sProfileDirectory, 0, 50, 500, 600)
302301

303302
; Initialize JavaScript Bridge
304303
Local $oJS = $oWebV2M.GetBridge()
@@ -480,4 +479,3 @@ Func _Web_jsonTreeFind(ByRef $oWebV2M, $sSearch, $bNext = False)
480479
EndFunc ;==>_Web_jsonTreeFind
481480
#EndRegion ; === UTILS ===
482481
#EndRegion ; UDF TESTING EXAMPLE
483-

0 commit comments

Comments
 (0)