mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 17:35:36 +00:00
cmd/gogio: fix argv passing from URL search fragment to Go program
Fixes the examples on gioui.org/doc/architecture. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -144,7 +144,7 @@ const (
|
|||||||
// jsStartGo initializes the main.wasm.
|
// jsStartGo initializes the main.wasm.
|
||||||
jsStartGo = `(() => {
|
jsStartGo = `(() => {
|
||||||
defaultGo = new Go();
|
defaultGo = new Go();
|
||||||
Object.assign(defaultGo["argv"], go["argv"]);
|
Object.assign(defaultGo["argv"], defaultGo["argv"].concat(go["argv"]));
|
||||||
Object.assign(defaultGo["env"], go["env"]);
|
Object.assign(defaultGo["env"], go["env"]);
|
||||||
for (let key in go["importObject"]) {
|
for (let key in go["importObject"]) {
|
||||||
if (typeof defaultGo["importObject"][key] === "undefined") {
|
if (typeof defaultGo["importObject"][key] === "undefined") {
|
||||||
|
|||||||
Reference in New Issue
Block a user