You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/content/doc/developers/guidelines-frontend.md
+59
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,65 @@ We recommend [Google HTML/CSS Style Guide](https://google.github.io/styleguide/h
39
39
6. The backend can pass complex data to the frontend by using `ctx.PageData["myModuleData"] = map[]{}`
40
40
7. Simple pages and SEO-related pages use Go HTML Template render to generate static Fomantic-UI HTML output. Complex pages can use Vue2 (or Vue3 in future).
41
41
42
+
43
+
### `async` Functions
44
+
45
+
Only mark a function as `async` if and only if there are `await` calls
46
+
or `Promise` returns inside the function.
47
+
48
+
It's not recommended to use `async` event listeners, which may lead to problems.
49
+
The reason is that the code after await is executed outside the event dispatch.
0 commit comments