I am using the following to run wasm tests:
GOOS=js GOARCH=wasm go test -exec "node $(go env GOROOT)/misc/wasm/wasm_exec
Because I'm in a node environment, the Global().Get("document") is empty.
I need to be able to populate that with the correct document object so I
can test DOM manipulation. However, I am not sure how to do this. The
document needs to be some specific object type and not a string
representing the page, which I could achieve with .Set(string).
In javascript, I believe you can do:
document.implementation.createHTMLDocument()
Anyone know if this is possible to do from syscall/js and if so how to do
this?
Thanks!
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/89fae903-8933-49b2-8418-4d711bae7c0dn%40googlegroups.com.