Skip to content

Commit 6720f48

Browse files
authored
Refactor HTTP Status Code Tracking example
English comments
1 parent 77e1afd commit 6720f48

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

examples/007-HTTP_StatusCodeTracking.au3

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,16 @@ Func _Example_HTTP_Tracking()
2222
Local $sProfileDirectory = @ScriptDir & "\NetWebView2Lib-UserDataFolder"
2323
_NetWebView2_Initialize($oWebV2M, $hGUI, $sProfileDirectory, 0, 0, 0, 0, True, True, True, 1.2, "0x2B2B2B")
2424

25-
; Ρύθμιση του HTTP Tracking
25+
; Setting up HTTP Tracking
2626
$oWebV2M.HttpStatusCodeEventsEnabled = True
2727

28-
; Φιλτράρισμα μόνο για το Main Document
29-
; Πολύ σημαντικό για να μην κολλάει το GUI από εκατοντάδες αιτήματα (εικόνες, scripts κλπ)
28+
; Filtering only for the Main Document
29+
; Very important to prevent the GUI from getting stuck by hundreds of requests (images, scripts, etc.)
3030
$oWebV2M.HttpStatusCodeDocumentOnly = True
3131

3232

33-
; Δοκιμή με μια σελίδα που δεν υπάρχει για να δούμε το 404
34-
;~ $oWebV2M.Navigate("https://google.com/this-page-does-not-exist")
33+
; Testing with a non-existent page to see the 404
3534
_NetWebView2_Navigate($oWebV2M, "https://google.com/this-page-does-not-exist")
36-
;~ $oWebV2M.Navigate("https://google.com")
3735

3836
GUISetState(@SW_SHOW)
3937

@@ -135,4 +133,3 @@ Func WebEvents_OnWebResourceResponseReceived($oWebV2M, $hGUI, $iStatusCode, $sRe
135133
EndFunc ;==>WebEvents_OnWebResourceResponseReceived
136134

137135
#EndRegion ; === EVENT HANDLERS ===
138-

0 commit comments

Comments
 (0)