Skip to content

Commit a521271

Browse files
authored
Refactor BasicFramesDemo.au3 for clarity and updates
1 parent b2a7d38 commit a521271

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

examples/018-BasicFramesDemo.au3

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ Func Main()
8080

8181
#Region ; Example part 3 - testing NetWebView2Lib methodes .GetFrameHtmlSource($IDX_Frame)
8282
ConsoleWrite("+ Example part 3 - testing NetWebView2Lib methodes .GetFrameHtmlSource($IDX_Frame)" & @CRLF)
83-
Local $oFrame
83+
Local $oFrame, $sHtmlSource
8484
For $IDX_Frame = 0 To $iFrameCount - 1
8585
$oFrame = $oWebV2M.GetFrame($IDX_Frame)
86-
If Not IsObj($oFrame) Then ContinueLoop
87-
Local $sHtmlSource = _WebView2_FrameGetHtmlSource($oFrame)
86+
$sHtmlSource = _WebView2_FrameGetHtmlSource($oFrame)
87+
If @error Then ContinueLoop
8888
ConsoleWrite(@CRLF & "======================================================" & @CRLF)
8989
ConsoleWrite("! " & @ScriptLineNumber & " : GetFrameHtmlSource(" & $IDX_Frame & ") :" & @CRLF & $sHtmlSource & @CRLF)
9090
Next
@@ -203,3 +203,4 @@ Func __Example_Log($s_ScriptLineNumber, $sString, $iError = @error, $iExtended =
203203
Return SetError($iError, $iExtended, '')
204204
EndFunc ;==>__Example_Log
205205

206+

0 commit comments

Comments
 (0)