perkeep/vendor/myitcv.io/react/unsafe_js.go

18 lines
262 B
Go

// +build js
package react
import (
"unsafe"
"github.com/gopherjs/gopherjs/js"
)
func wrapValue(v interface{}) *js.Object {
return js.InternalObject(&v)
}
func unwrapValue(v *js.Object) interface{} {
return *(*interface{})(unsafe.Pointer(v.Unsafe()))
}