Skip to content

Commit f33c1af

Browse files
JohanSmariusjfversluisCopilot
authored
Update webview.md (#2970)
* Update webview.md Fix #2931 Reformatted the JS code to make it a bit more readable as requested. Added rounded brackets as well to better show the scope of the if statement. * Update docs/user-interface/controls/webview.md Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Gerald Versluis <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent 4f49e0f commit f33c1af

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

docs/user-interface/controls/webview.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -428,12 +428,15 @@ The `WebView.EvaluateJavaScriptAsync` method evaluates the JavaScript that's spe
428428
<body>
429429
<script type="text/javascript">
430430
function factorial(num) {
431-
if (num === 0 || num === 1)
432-
return 1;
433-
for (var i = num - 1; i >= 1; i--) {
434-
num *= i;
435-
}
436-
return num;
431+
if (num === 0 || num === 1) {
432+
return 1;
433+
}
434+
435+
for (var i = num - 1; i >= 1; i--) {
436+
num *= i;
437+
}
438+
439+
return num;
437440
}
438441
</script>
439442
</body>

0 commit comments

Comments
 (0)