The following sample using reflect to compare pointers works in gc, but it fails when using gopherJS. http://play.golang.org/p/33bND01kB0