diff --git a/src/syscall/js/js.go b/src/syscall/js/js.go index 19cdedc309ad6e..885723f87d690b 100644 --- a/src/syscall/js/js.go +++ b/src/syscall/js/js.go @@ -114,6 +114,8 @@ func Global() Value { // | string | string | // | []interface{} | new array | // | map[string]interface{} | new object | +// +// Panics if x is not one of the expected types. func ValueOf(x interface{}) Value { switch x := x.(type) { case Value: // should precede Wrapper to avoid a loop