This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Preserve and restore window state in localStorage. | |
// Adapted for Electron from nw.js: | |
// https://github.com/nwjs/nw.js/wiki/Preserve-window-state-between-sessions | |
// | |
// As written, it only handles a single-window app. | |
// | |
// This code is meant to run in the renderer process. | |
// To use, load from index.html (or whatever file you loadUrl into your BrowserWindow): | |
// <script src="winstate.js"></script> |