Closed
Description
IIUC, the initial value of js.Object and null in JavaScript are different. I found out that I need JavaScript null instead of nil when, for example, calling gl.bindFramebuffer whose second argument must be Framebuffer or null (not js.Object nil).
package main
import (
"github.com/gopherjs/gopherjs/js"
)
func main() {
var null1 js.Object
print(null1) // Object {$key: function}
var null2 = js.Global.Call("eval", "null")
print(null2) // null
}
Now that there seems no easy way to get JavaScript null with GopherJS. can we have new API to get such null, or is there anything I missed?
Metadata
Metadata
Assignees
Labels
No labels