Skip to content

Instantly share code, notes, and snippets.

@triacontane
Created April 14, 2017 16:56
Show Gist options
  • Save triacontane/df61a7ff9901e0dd38246fe7ee90e5da to your computer and use it in GitHub Desktop.
Save triacontane/df61a7ff9901e0dd38246fe7ee90e5da to your computer and use it in GitHub Desktop.
nw.jsでウィンドウクローズ前に任意の処理を行う
if (!Utils.isNwjs()) return;
var nwWin = require('nw.gui').Window.get();
nwWin.on('close', function() {
// do something
nwWin.close(true);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment