global.Dialog.ImportFile = global.Dialog.extend({
title: "Import options",
dialogClass: "import-file-dialog",
init: function (filename, onSubmit) {
// ...
this.showWindow();
},
showWindow: function () { ... }
});
var ClassOrModule = {}; // global class or module
var someGlobalVar = 123; // just variable, very rare, usually inside some module
var MY_APP_VERSION = "1.2.3"; // something like constants, can also use 'const' keyword
This is one of the reason we decided to use a language that compiles to for NW.js apps instead of using JavaScript. Structuring code always feel like a hack in js.
--
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.
For more options, visit https://groups.google.com/d/optout.