How to programmatically identify SDK from Normal build?
Maybe like this:
var win = nw.Window.get(), isSDK = 'showDevTools' in win;
where isSDK yields true if you are using the SDK build.
var isSDKBuild = (window.navigator.plugins.namedItem('Native Client') !== null);
I think we can add the flavor to process.versions. @rogerwang
@iteufel
Your solution would give a false positive with the upcoming NaCL flavor, wouldn't it?
https://github.com/nwjs/nw.js/wiki/Build-Flavors
@divinemanwah
Your's yields true with the normal version of v0.19.5, but happily throws errors then
[24298:24298:0110/140755:ERROR:CONSOLE(1)] "Uncaught ReferenceError: DevToolsAPI is not defined", source: (1)
[24298:24298:0110/140755:ERROR:CONSOLE(1)] "Uncaught ReferenceError: DevToolsAPI is not defined", source: (1)
@rbeer No the NaCL flavor isn't used anymore.
@iteufel
Huh... How was I ever under the impression 0.13.x would be an _upcoming_ release? :joy:
Your line works just fine, then. Thank you! :)
Doesn't work if plugins are disabled, any plans for adding the flavor id to process?
This is fixed in git and will be available in the next nightly build.
Most helpful comment
I think we can add the flavor to
process.versions. @rogerwang