github.com/jgarto/itcv@v0.0.0-20180826224514-4eea09c1aa0d/unsafe_js.go (about) 1 // +build js 2 3 package react 4 5 import ( 6 "unsafe" 7 8 "github.com/gopherjs/gopherjs/js" 9 ) 10 11 func wrapValue(v interface{}) *js.Object { 12 return js.InternalObject(v) 13 } 14 15 func unwrapValue(v *js.Object) interface{} { 16 return (interface{})(unsafe.Pointer(v.Unsafe())) 17 }