Skip to content

Cannot fmt.Println a js.Object #8

Closed
@dominikh

Description

@dominikh

(Tested in the playground)

package main

import (
    "fmt"
    "github.com/neelance/gopherjs/js"
)

func main() {
    fmt.Println(js.Global("window"))
}
TypeError: Object function Window() { [native code] } has no method 'reflectType'
    at Object.go$packages.reflect.ValueOf (http://neelance.github.io/gopherjs-playground/gopherjs-playground.js:26333:28)
    at go$packages.fmt.pp.Ptr.printArg (http://neelance.github.io/gopherjs-playground/gopherjs-playground.js:28521:57)
    at go$packages.fmt.pp.Ptr.doPrint (http://neelance.github.io/gopherjs-playground/gopherjs-playground.js:28928:19)
    at go$packages.fmt.Fprintln (http://neelance.github.io/gopherjs-playground/gopherjs-playground.js:27961:5)
    at Object.go$packages.fmt.Println (http://neelance.github.io/gopherjs-playground/gopherjs-playground.js:27970:14)
    at Object.go$packages.main.main [as main] (eval at <anonymous> (http://neelance.github.io/gopherjs-playground/gopherjs-playground.js:65880:14), <anonymous>:6:7)
    at eval (eval at <anonymous> (http://neelance.github.io/gopherjs-playground/gopherjs-playground.js:65880:14), <anonymous>:157:21)
    at eval (native)
    at go$packages.github.com/neelance/gopherjs-playground.evalScript (http://neelance.github.io/gopherjs-playground/gopherjs-playground.js:65880:14)
    at h.app.NewController.run (http://neelance.github.io/gopherjs-playground/gopherjs-playground.js:65813:5)
    at https://ajax.googleapis.com/ajax/libs/angularjs/1.2.8/angular.min.js:162:407
    at https://ajax.googleapis.com/ajax/libs/angularjs/1.2.8/angular.min.js:179:83
    at h.$eval (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.8/angular.min.js:102:293)
    at h.$apply (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.8/angular.min.js:103:48)
    at HTMLInputElement.<anonymous> (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.8/angular.min.js:179:65)
    at https://ajax.googleapis.com/ajax/libs/angularjs/1.2.8/angular.min.js:27:208
    at q (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.8/angular.min.js:7:380)
    at HTMLInputElement.Zc.c (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.8/angular.min.js:27:190) angular.js:9413

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions