Skip to content

Commit 28a4005

Browse files
committed
chore: make minor documentation related cleanups
1 parent 9e4cb3f commit 28a4005

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

examples/project-structure/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ This example integrates the [`v-js-interop-app`](https://github.com/ttytm/webvie
44
into a project structure that can be used as a starting guide for more complex Webview projects.
55

66
```
7+
├── assets/
8+
│ └── icon.ico
79
├── src/
810
│ ├── api.v
911
│ ├── main.v

examples/v-js-interop-simple/main.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ const doc = '<!DOCTYPE html>
1717
function myJsFunction(myArg) {
1818
console.log("Called myJsFunction:", myArg);
1919
};
20-
// Calls a V function that in turn calls the above JS function
20+
// Calls a V function that in turn calls the above JS function.
2121
window.interop();
2222
23-
// Calls a V function that returns a Value
23+
// Calls a V function that returns a Value.
2424
(async () => {
2525
num = await window.double(2);
2626
console.log(num);
@@ -36,7 +36,7 @@ fn interop(e &webview.Event) voidptr {
3636
return webview.no_result
3737
}
3838

39-
// Returns a value to JS
39+
// Returns a value to JS.
4040
fn double(e &webview.Event) int {
4141
return e.int(0) * 2
4242
}

src/lib.v

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ pub const no_result = unsafe { nil }
6060
// Depending on the platform, a GtkWindow, NSWindow or HWND pointer can be passed here.
6161
// Returns null on failure. Creation can fail for various reasons such as when required runtime
6262
// dependencies are missing or when window creation fails.
63-
6463
pub fn create(opts CreateOptions) &Webview {
6564
return C.webview_create(int(opts.debug), opts.window)
6665
}
@@ -105,8 +104,8 @@ pub fn (w &Webview) get_window() voidptr {
105104
return C.webview_get_window(w)
106105
}
107106

108-
// set_icon updates the icon for the native window. It supports Windows HWND and Linux GTK windows
109-
// under X11 - Under Wayland, window application mapping is based on the desktop file entry name.
107+
// set_icon updates the icon of the native window. It supports Windows HWND windows and Linux GTK
108+
// windows under X11 - under Wayland, window application mapping is based on the desktop file entry name.
110109
// TODO: add macOS support
111110
pub fn (w &Webview) set_icon(icon_file_path string) ! {
112111
$if windows {

tests/v_fn_call_test.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn gen_html(test_name string, script string) string {
1515
}
1616

1717
fn test_timeout() {
18-
// We check if the V functions are called and windows closed successfully within 30 seconds.
18+
// We check if the V functions are called and windows closed successfully within 60 seconds.
1919
// Otherwise, windows can remain open and the test can run indefinitely.
2020
spawn fn () {
2121
time.sleep(60 * time.second)

0 commit comments

Comments
 (0)