Skip to content

Commit 9fac232

Browse files
authored
Refactor WebView2 demo script for clarity
from: If MsgBox(36, "Confirm", "Exit Application?", 0, $hGUI) = 6 Then Exit To: If MsgBox(36, "Confirm", "Exit Application?", 0, $hGUI) = 6 Then WinClose($hGUI) to proceed normally in Net WebView2 CleanUp()
1 parent 27af028 commit 9fac232

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

examples/1-BasicDemo.au3

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Func _BridgeMyEventsHandler_OnMessageReceived($sMessage)
7676
Local Static $iMsgCnt = 0
7777

7878
If $sMessage = "CLOSE_APP" Then
79-
If MsgBox(36, "Confirm", "Exit Application?", 0, $hGUI) = 6 Then Exit
79+
If MsgBox(36, "Confirm", "Exit Application?", 0, $hGUI) = 6 Then WinClose($hGUI)
8080
Else
8181
MsgBox(64, "JS Notification", "Message from Browser: " & $sMessage)
8282
$iMsgCnt += 1
@@ -103,3 +103,4 @@ Func __GetDemoHTML()
103103
'</body></html>'
104104
Return $sH
105105
EndFunc ;==>__GetDemoHTML
106+

0 commit comments

Comments
 (0)