nodejs-std icon indicating copy to clipboard operation
nodejs-std copied to clipboard

NodeJS Webkit

Open ncannasse opened this issue 12 years ago • 2 comments

When using -lib nodejs with NodeJS Webkit, it complains about some vars not being defined.

Adding the following line at the beginning of js.Node.init() fixes it:

untyped __js__("var __filename, __dirname, module");

ncannasse avatar Sep 23 '13 08:09 ncannasse

Actually I found that using haxe.Timer seems also to break, since it's using Node one instead of Browser one (I get an illegalInvocation on js.Node.setInterval). Maybe having a #if nodeWebkit would help here?

ncannasse avatar Sep 23 '13 15:09 ncannasse

Now i'm use this: https://github.com/dionjwa/nodejs-std/blob/master/src/haxe/Timer.hx But place this in standard library good idea

AxGord avatar Sep 25 '13 12:09 AxGord