File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Original file line number Diff line number Diff line change @@ -97,7 +97,13 @@ func (err *Error) Stack() string {
97
97
// Global gives JavaScript's global object ("window" for browsers and "GLOBAL" for Node.js).
98
98
var Global * Object
99
99
100
- // Module gives the value of the "module" variable set by Node.js. Hint: Set a module export with 'js.Module.Get("exports").Set("exportName", ...)'.
100
+ // Module gives the value of the "module" variable set by Node.js. Hint: Set a
101
+ // module export with 'js.Module.Get("exports").Set("exportName", ...)'.
102
+ //
103
+ // Note that js.Module is only defined in runtimes which support CommonJS
104
+ // modules (https://nodejs.org/api/modules.html). NodeJS supports it natively,
105
+ // but in browsers it can only be used if GopherJS output is passed through a
106
+ // bundler which implements CommonJS (for example, webpack or esbuild).
101
107
var Module * Object
102
108
103
109
// Undefined gives the JavaScript value "undefined".
You can’t perform that action at this time.
0 commit comments