Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ToJs ¶
Transform a Go value into a JavaScript value.
For the type: js.Value, js.Wrapper, js.Func, nil, bool, string, int, int8, int16, int32, uint, uint8, uint16, uint32, float32, float64 it's like js.ValueOf function.
| Go | JavaScript | | ---------------------- | ---------------------- | | int64 | BigInt | | uint64 | BigInt | | []byte | Uint8array | | time.Time | Date | | map[...]bool | Set | | map[...]... | Map | | struct{...} | Object | | []... (slice or array) | Array |
Other type like function or channel panics.
Struct field support tag:
struct{ Int int `js:"int"` }
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.