dominikh / go-js-dom

MIT License
252 stars 42 forks source link

Accessing Values From Input Forms #38

Closed yairark closed 7 years ago

yairark commented 7 years ago

Based on documentation it looks be that you would have to use HTML input events to gather information from input fields. Is there no golang alternative to using a .value in JS terms?

dmitshur commented 7 years ago

Based on documentation

Which documentation are you referring to?

use HTML input events

Do you mean, in a callback for "input" events, you want to access the input value?

Is there no golang alternative to using a .value in JS terms?

Are you referring to the value field of an HTML input element?

If so, there is one:

https://godoc.org/honnef.co/go/js/dom#HTMLInputElement.Value

Is that what you're looking for?

yairark commented 7 years ago

That's exactly what I was looking for lol! Thanks!