Re: [go-nuts] Re: syscall/js: JS Module Dynamic Imports?

2020-10-05 Thread Eduard Castany
/spikenow.com/r/a/?ref=spike-organic-signature&_ts=pengd> [image: > pengd] > > On September 29, 2020 at 12:55 GMT, Eduard Castany > wrote: > > I guess this works on node.js but I was referring to the browser > environment. Where normal JavaScript can just `import

[go-nuts] Re: syscall/js: JS Module Dynamic Imports?

2020-09-29 Thread Eduard Castany
I guess this works on node.js but I was referring to the browser environment. Where normal JavaScript can just `import("module")`. On Tuesday, 29 September 2020 at 11:44:56 UTC+2 Alvadron wrote: > This is what I have been doing and it has worked for my needs: > ``` > // Importing it using "requi

[go-nuts] syscall/js: JS Module Dynamic Imports?

2020-09-29 Thread Eduard Castany
In JavaScript we can import JavaScript modules statically and dynamically. How could we import a JavaScript module dynamically in Go? The closest/simplest thing may be to add an HTML script tag into the page