Opening a New Window without nodejs

24 views
Skip to first unread message

Carey Williams

unread,
Apr 11, 2021, 10:34:39 AM4/11/21
to nw.js
Hello,

I am wondering if it's possible to open a new window (gui.Window.open) without access to the node API. I know you can use new_instance to launch one in a separate process, but with access to nodejs APIs, this still isn't suitable for say running untrusted code.

It seems historically there used to be a nodejs: false option you could pass, but that doesn't appear to be supported anymore. The only (clunky) alternative I can think of is opening a new window and setting up a new webview inside of it.

I apologise if this has been answered before, or is documented somewhere (I have looked long and hard to no avail!).

Thanks in advance,
CW

Roger Wang

unread,
Apr 11, 2021, 10:19:31 PM4/11/21
to Carey Williams, nw.js
Hello,

It can be also controlled by hosting the untrusted page under different domains. See also https://nwjs.readthedocs.io/en/latest/For%20Users/Advanced/Security%20in%20NW.js/

Any questions let me know.

Best regards,
Roger

--
You received this message because you are subscribed to the Google Groups "nw.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nwjs-general...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nwjs-general/3fb31f88-5e39-4d45-b10d-c787dfa3ff8en%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages