|
6 | 6 |
|
7 | 7 | #Tidy_Parameters=/tcb=-1 |
8 | 8 |
|
9 | | -; NetWebView2Lib.au3 - Script Version: 2026.3.17.12 🚩 |
| 9 | +; NetWebView2Lib.au3 - Script Version: 2026.3.17.22 🚩 |
10 | 10 |
|
11 | 11 | #include <Array.au3> |
12 | 12 | #include <GUIConstantsEx.au3> |
@@ -1498,7 +1498,7 @@ EndFunc ;==>__NetWebView2_freezer |
1498 | 1498 |
|
1499 | 1499 | #EndRegion ; === NetWebView2Lib UDF === #INTERNAL_USE_ONLY# |
1500 | 1500 |
|
1501 | | -#Region ; === NetWebView2Lib UDF === EVENT HANDLERS === Collection === |
| 1501 | +#Region ; === NetWebView2Lib UDF === EVENT HANDLERS ***** Collection ***** |
1502 | 1502 |
|
1503 | 1503 | #Region ; === NetWebView2Lib UDF === EVENT HANDLERS === Error Handlers === |
1504 | 1504 | ; #INTERNAL_USE_ONLY# =========================================================================================================== |
@@ -1628,9 +1628,17 @@ Volatile Func __NetWebView2_Events__OnMessageReceived($oWebV2M, $hGUI, $sMsg) |
1628 | 1628 | __NetWebView2_LastMessage_KEEPER($oWebV2M, $NETWEBVIEW2_MESSAGE__URL_CHANGED) |
1629 | 1629 |
|
1630 | 1630 | Case "NAV_ERROR" |
1631 | | - __NetWebView2_Log(@ScriptLineNumber, $s_Prefix & " COMMAND:" & $sCommand, 1) |
1632 | | - __NetWebView2_LastMessage_KEEPER($oWebV2M, $NETWEBVIEW2_MESSAGE__NAV_ERROR) |
1633 | | - $oWebV2M.Stop() |
| 1631 | + If $sData = "OperationCanceled" Then ; Check if the error is actually a user cancellation |
| 1632 | + __NetWebView2_Log(@ScriptLineNumber, $s_Prefix & " COMMAND:USER_ABORT (Navigation Canceled)", 1) |
| 1633 | + __NetWebView2_LastMessage_KEEPER($oWebV2M, $NETWEBVIEW2_MESSAGE__USER_ABORT) |
| 1634 | + Else |
| 1635 | + __NetWebView2_Log(@ScriptLineNumber, $s_Prefix & " COMMAND:" & $sCommand & " Data:" & $sData, 1) |
| 1636 | + __NetWebView2_LastMessage_KEEPER($oWebV2M, $NETWEBVIEW2_MESSAGE__NAV_ERROR) |
| 1637 | + $oWebV2M.Stop() ; We only stop if it is a real error. |
| 1638 | + EndIf |
| 1639 | + |
| 1640 | + ; 🚧 ******************************************* |
| 1641 | + ConsoleWrite("> TEST NAV_ERR: " & $sMsg & @CRLF) |
1634 | 1642 | ConsoleWrite("> TEST NAV_ERR: __NetWebView2_LastMessage_KEEPER($oWebV2M)=" & __NetWebView2_LastMessage_KEEPER($oWebV2M) & " SLN=" & @ScriptLineNumber & @CRLF) |
1635 | 1643 |
|
1636 | 1644 | Case "NAV_COMPLETED" |
@@ -1957,7 +1965,7 @@ EndFunc ;==>__NetWebView2_Events__OnTitleChanged |
1957 | 1965 | ; Modified ......: |
1958 | 1966 | ; Remarks .......: |
1959 | 1967 | ; Related .......: |
1960 | | -; Link ..........: |
| 1968 | +; Link ..........: https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2.navigationstarting |
1961 | 1969 | ; Example .......: No |
1962 | 1970 | ; =============================================================================================================================== |
1963 | 1971 | Volatile Func __NetWebView2_Events__OnNavigationStarting($oWebV2M, $hGUI, $oArgs) |
@@ -2052,7 +2060,7 @@ EndFunc ;==>__NetWebView2_Events__OnContextMenu |
2052 | 2060 | ; Modified ......: |
2053 | 2061 | ; Remarks .......: |
2054 | 2062 | ; Related .......: |
2055 | | -; Link ..........: https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2.webresourceresponsereceived?view=webview2-dotnet-1.0.2849.39 |
| 2063 | +; Link ..........: https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2.webresourceresponsereceived |
2056 | 2064 | ; Example .......: No |
2057 | 2065 | ; =============================================================================================================================== |
2058 | 2066 | Volatile Func __NetWebView2_Events__OnWebResourceResponseReceived($oWebV2M, $hGUI, $iStatusCode, $sReasonPhrase, $sRequestUrl) |
@@ -2205,7 +2213,7 @@ EndFunc ;==>__NetWebView2_Events__OnProcessFailed |
2205 | 2213 | ; Remarks .......: The host can provide a response with credentials for the authentication or cancel the request. |
2206 | 2214 | ; If the host sets the Cancel property to false but does not provide either UserName or Password properties on the Response property, then WebView2 will show the default authentication challenge dialog prompt to the user. |
2207 | 2215 | ; Related .......: |
2208 | | -; Link ..........: https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2.basicauthenticationrequested?view=webview2-dotnet-1.0.2903.40 |
| 2216 | +; Link ..........: https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2.basicauthenticationrequested |
2209 | 2217 | ; Example .......: No |
2210 | 2218 | ; =============================================================================================================================== |
2211 | 2219 | Volatile Func __NetWebView2_Events__OnBasicAuthenticationRequested($oWebV2M, $hGUI, $oArgs) |
@@ -2431,4 +2439,4 @@ EndFunc ;==>__NetWebView2_Events__FrameKeeper |
2431 | 2439 | ;~ EndFunc ;==>__NetWebView2_Events__OnScreenCaptureStarting |
2432 | 2440 | #EndRegion ; === NetWebView2Lib UDF === EVENT HANDLERS * #TODO === |
2433 | 2441 |
|
2434 | | -#EndRegion ; === NetWebView2Lib UDF === EVENT HANDLERS === Collection === |
| 2442 | +#EndRegion ; === NetWebView2Lib UDF === EVENT HANDLERS ***** Collection ***** |
0 commit comments