Comments (1)
Temporal solution:
Javascript Code:
ws.send(JSON.stringify({
event: "Chrome",
variables: v
}))
(v is a parameter of a function)
I added Variables string
json:"variables"`` into Event struct
I added a global variable into gotron.go var UserVar = make(chan Event)
after to Event struct
In function "onSocket" after of:
//Handle Message
err = json.Unmarshal(message, &event)
errz.Fatal(err, "Unmashal: ")
logger.Debug().Msgf("ElectronSocket: [received] %+v", event)
I added:
go func() { UserVar <- event }()
I call the variable in my code this way:
window.On(&Evento, func(bin []byte) {
item := <-gotron.UserVar
fmt.Println(item.Variables)
})
^^
from gotron.
Related Issues (20)
- copy.Perm undefined HOT 1
- Using gotron-builder failed HOT 5
- gotron-builder failed with --win, on mac HOT 4
- gotron-builder fails on windows HOT 1
- gotron-builder fails on windows HOT 9
- Notes for install with godep HOT 3
- Changing application icon HOT 7
- Gotron-builder does not create a self-contained application HOT 2
- hang up on Ubuntu 19.04 HOT 2
- Refactor window.On to accept String as Event
- Apps using Gotron
- file actions (e.g., drag and drop)
- Typescript-vue example
- fork/exec node_modules/.bin/electron-builder: no such file or directory: HOT 1
- Is this project still maintained? HOT 2
- Cannot find .gotron/node_modules/.bin/electron on first run HOT 1
- chmod .gotron/assets: operation not permitted HOT 2
- Arch: 'error while loading shared libraries: libgconf-2.so.4'
- Is this project still going on HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gotron.