updated ui extensions api to allow top-level await calls

This commit is contained in:
Gani Georgiev
2026-05-10 14:36:09 +03:00
parent 1b5ea9a1fa
commit 81a5672498
6 changed files with 11 additions and 9 deletions
+2 -1
View File
@@ -81,7 +81,8 @@ func copyExtensionMainjs(buf *bytes.Buffer, ext core.UIExtension) error {
defer f.Close()
// wrap in a self-executing function to avoid scope and concatenation issues
_, _ = buf.WriteString("(function(){")
// (the await/async is for top-level await)
_, _ = buf.WriteString("await (async function(){")
_, err = io.Copy(buf, f)
if err != nil {