electron - How to reset the renderer javascript context in atom-shell -


in standard browser, loading new url reset javascript context. ie. global variables, compiled functions , events cleared, , browser start clean slate.

in atom-shell however, calling mainwindow.loadurl load new html file, keep javascript context alive. , variables need deleted hang around. how can tell atom-shell wipe out whole javascript context on renderer side?

check out browserwindow.reload() or webcontents.reload().

if on 'renderer' side, can use remote.getcurrentwindow().reload()

https://github.com/atom/atom-shell/blob/master/docs/api/browser-window.md#browserwindowreload

if want wipe 'javascript context' on browser side too, need dereference window , create new window.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -